ham-fisted.bloom-filter

Simple fast bloom filter based on apache parquet BlockSplitBloomFilter.

add-uuids!

(add-uuids! bf val-seq)

bitset-size

(bitset-size fb)

Return the length of the byte array underlying this bitset

bloom-filter

(bloom-filter n f)

Create a bloom filter.

  • 'n' - Number of distinct values.
  • 'f' - Value from 1.0-0.0, defaults to 0.01. False positive rate.

bloom-filter->byte-array

(bloom-filter->byte-array bf)

byte-array->bloom-filter

(byte-array->bloom-filter data)

byte-array-cls

contains?

(contains? bf obj)

hash-obj

(hash-obj obj)

Hash an object. If integer - return integer else serialize->bytes and hash those

insert-hash!

(insert-hash! bf hc)

insert-obj

(insert-obj bf o)

make-long-hash-predicate

(make-long-hash-predicate bf)

make-obj-predicate

(make-obj-predicate bf)

make-uuid-hasher

(make-uuid-hasher)

make-uuid-pred

(make-uuid-pred bf)

serialize->bytes

(serialize->bytes o)

Serialize an object to a byte array