Skip to content

Sliceable BitMap #1802

@tustvold

Description

@tustvold

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changeloghelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions