Function croaring_sys::roaring_bitmap_serialize

source ·
pub unsafe extern "C" fn roaring_bitmap_serialize(
    r: *const roaring_bitmap_t,
    buf: *mut c_char
) -> usize
Expand description

Write the bitmap to an output pointer, this output buffer should refer to at least roaring_bitmap_size_in_bytes(r) allocated bytes.

See roaring_bitmap_portable_serialize() if you want a format that’s compatible with Java and Go implementations. This format can sometimes be more space efficient than the portable form, e.g. when the data is sparse.

Returns how many bytes written, should be roaring_bitmap_size_in_bytes(r).

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.