pub unsafe extern "C" fn roaring_bitmap_portable_serialize(
r: *const roaring_bitmap_t,
buf: *mut c_char,
) -> usizeExpand description
Write a bitmap to a char buffer. The output buffer should refer to at least
roaring_bitmap_portable_size_in_bytes(r) bytes of allocated memory.
Returns how many bytes were written which should match
roaring_bitmap_portable_size_in_bytes(r).
This is meant to be compatible with the Java and Go versions: https://github.com/RoaringBitmap/RoaringFormatSpec
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.
When serializing data to a file, we recommend that you also use checksums so that, at deserialization, you can be confident that you are recovering the correct data.