Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sliceable BitMap #1802

Closed
tustvold opened this issue Jun 6, 2022 · 1 comment · Fixed by #3749
Closed

Sliceable BitMap #1802

tustvold opened this issue Jun 6, 2022 · 1 comment · Fixed by #3749
Labels
enhancement Any new improvement worthy of a entry in the changelog help wanted

Comments

@tustvold
Copy link
Contributor

tustvold commented Jun 6, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

Currently BitMap is a simple wrapper around a Buffer. This limits it to slicing on multiples of 8, as Buffer can only slice at byte boundaries.

Describe the solution you'd like

Add an offset and length to BitMap, updating the accessors to take this into account. This may require deprecating and removing buffer_ref, and/or making it panic if non-zero offset.

Add a slice method to BitMap that uses the offset and length to perform zero-copy slicing.

Describe alternatives you've considered

We could not do this.

Additional context

Feeds into #1799

@tustvold tustvold added the enhancement Any new improvement worthy of a entry in the changelog label Jun 6, 2022
@HaoYang670
Copy link
Contributor

Related to this issue: #1728

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog help wanted
Projects
None yet
2 participants