Skip to content

binaryFuse16StaticFilter(keys, options?): StaticFilter

Defined in: packages/static-filter/src/binary-fuse-16-static-filter.ts:16

Build an immutable binary-fuse-16 filter from a known set of keys: two bytes per slot, about 18 to 20 bits per key, and a false-positive rate near 2^-16 (0.0015%).

Construction and probing are those of binaryFuse8StaticFilter with 16-bit fingerprints. Builds in expected O(n) time after hashing n inputs, with O(d) temporary storage for d distinct hashes.

Iterable<Uint8Array<ArrayBufferLike>>

StaticFilterOptions

StaticFilter

With INVALID_KEYS when keys is not iterable, INVALID_KEY when a key is not a Uint8Array, INVALID_SEED when seed is not an unsigned 64-bit bigint, MAX_CAPACITY_EXCEEDED past 2^30 distinct keys or when the runtime refuses the allocation, and CONSTRUCTION_FAILED when 100 attempts all fail to peel, which a set of distinct hashes does not reach in practice.