Function croaring_sys::roaring_bitmap_frozen_view
source · pub unsafe extern "C" fn roaring_bitmap_frozen_view(
buf: *const c_char,
length: usize
) -> *const roaring_bitmap_t
Expand description
Creates constant bitmap that is a view of a given buffer.
Buffer data should have been written by roaring_bitmap_frozen_serialize()
Its beginning must also be aligned by 32 bytes.
Length must be equal exactly to roaring_bitmap_frozen_size_in_bytes()
.
In case of failure, NULL is returned.
Bitmap returned by this function can be used in all readonly contexts. Bitmap must be freed as usual, by calling roaring_bitmap_free(). Underlying buffer must not be freed or modified while it backs any bitmaps.
This function is endian-sensitive. If you have a big-endian system (e.g., a mainframe IBM s390x), the data format is going to be big-endian and not compatible with little-endian systems.