roaringBitset(
options?):Bitset
Defined in: packages/bitset/src/roaring-bitset.ts:25
A bitset of unsigned 32-bit ids over 65,536-id chunks, each a sorted id array or an 8 KB bitmap.
This is the recommended layout: memory follows the ids actually stored, so a
caller that does not yet know how far its ids range does not pay for the span.
Chunked containers also make isDisjointFrom and intersectionSize stop at
the first chunk that decides them.
Parameters
Section titled “Parameters”options?
Section titled “options?”Optional items, added as if by add.
Returns
Section titled “Returns”Throws
Section titled “Throws”With code INVALID_ID when an item is not in 0 … BITSET_MAX_ID.
Example
Section titled “Example”const seen = roaringBitset({ items: [3, 65_536] })seen.has(3) // trueseen.size // 2