Skip to content

No way to do zerocopy deserialize #57

@giannitedesco

Description

@giannitedesco

I'd like to Bitmap.deserialize from a read-only mmap file which contains a large roaring bitmap. To do that I have to copy the bitmap in to a bytes by slicing it, because if I use a memoryview instead, I get the error

  File "pyroaring/abstract_bitmap.pxi", line 726, in pyroaring.AbstractBitMap.deserialize
TypeError: expected bytes, memoryview found

It should be possible to use the buffer protocol in conjunction with roaring_bitmap_portable_deserialize_safe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions