Function croaring_sys::roaring64_bitmap_portable_serialize

source ยท
pub unsafe extern "C" fn roaring64_bitmap_portable_serialize(
    r: *const roaring64_bitmap_t,
    buf: *mut c_char
) -> usize
Expand description

Write a bitmap to a buffer. The output buffer should refer to at least roaring64_bitmap_portable_size_in_bytes(r) bytes of allocated memory.

Returns how many bytes were written, which should match roaring64_bitmap_portable_size_in_bytes(r).

This is meant to be compatible with other languages: https://github.com/RoaringBitmap/RoaringFormatSpec#extension-for-64-bit-implementations

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.