Values represented by the filter.
Builds a filter from its elements, or restores a serialised filter.
Values represented by the filter.
A new Ribbon filter.
ReadonlyfilterSolution table, one fingerprintBits-wide row after another.
ReadonlyfingerprintBits per fingerprint; the false positive rate is 2^-fingerprintBits.
ReadonlyseedSeed for the default hash function.
ReadonlysizeNumber of rows in the solution table, after any growth during the build.
Checks whether an element may be present in the filter.
Value to look up.
false guarantees the element is absent; true means it may be
present and can be a false positive.
Returns the filter state in a JSON-serialisable form.
Fingerprint bits, seed, and table data.
A space-efficient, static probabilistic set for values with a stable
toString().A Ribbon filter is built once from its complete set of elements and cannot be changed afterwards. Membership checks can produce false positives, at a rate of 2^-
fingerprintBits, but never false negatives.This is a Standard Ribbon filter (Dillinger and Walzer, 2021) with a ribbon width of at most 32 bits. The filter uses seeded XXH64 hashing with enhanced double hashing by default. This hash is non-cryptographic and should not be used for security-sensitive purposes.
Example