Function croaring_sys::roaring_bitmap_internal_validate
source ยท pub unsafe extern "C" fn roaring_bitmap_internal_validate(
r: *const roaring_bitmap_t,
reason: *mut *const c_char,
) -> bool
Expand description
Perform internal consistency checks. Returns true if the bitmap is consistent. It may be useful to call this after deserializing bitmaps from untrusted sources. If roaring_bitmap_internal_validate returns true, then the bitmap should be consistent and can be trusted not to cause crashes or memory corruption.
Note that some operations intentionally leave bitmaps in an inconsistent
state temporarily, for example, roaring_bitmap_lazy_*
functions, until
roaring_bitmap_repair_after_lazy
is called.
If reason is non-null, it will be set to a string describing the first inconsistency found if any.