Go to the documentation of this file.
137 typedef uint32_t (*
hashfp_t)(
const uint8_t *,
int len);
void bloom_del(bloom_t *bloom)
Delete a Bloom filter.
uint32_t(* hashfp_t)(const uint8_t *, int len)
hash function to use in thee filter
uint8_t * a
the bloom array
bloom_t bloom filter object
size_t m
number of bits in the bloom array
void bloom_init(bloom_t *bloom, size_t size, uint8_t *bitfield, hashfp_t *hashes, int hashes_numof)
Initialize a Bloom Filter.
hashfp_t * hash
the hash functions
bool bloom_check(bloom_t *bloom, const uint8_t *buf, size_t len)
Determine if a string is in the Bloom filter.
size_t k
number of hash functions
void bloom_add(bloom_t *bloom, const uint8_t *buf, size_t len)
Add a string to a Bloom filter.