Function croaring_sys::roaring_bitmap_to_bitset

source ·
pub unsafe extern "C" fn roaring_bitmap_to_bitset(
    r: *const roaring_bitmap_t,
    bitset: *mut bitset_t
) -> bool
Expand description

Store the bitmap to a bitset. This can be useful for people who need the performance and simplicity of a standard bitset. We assume that the input bitset is originally empty (does not have any set bit).

bitset_t * out = bitset_create(); // if the bitset has content in it, call “bitset_clear(out)” bool success = roaring_bitmap_to_bitset(mybitmap, out); // on failure, success will be false. // You can then query the bitset: bool is_present = bitset_get(out, 10011 ); // you must free the memory: bitset_free(out);