[][src]Function croaring_sys_mw::roaring_bitmap_frozen_view

pub unsafe extern "C" fn roaring_bitmap_frozen_view(
    buf: *const c_char,
    length: usize
) -> *const roaring_bitmap_t

Creates constant bitmap that is a view of a given buffer. Buffer must contain data previously written by roaring_bitmap_frozen_serialize(), and additionally its beginning must be aligned by 32 bytes. Length must be equal exactly to roaring_bitmap_frozen_size_in_bytes().

On error, 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.