22#ifndef _NETSURF_UTILS_BLOOM_H_
23#define _NETSURF_UTILS_BLOOM_H_
uint32_t bloom_items(struct bloom_filter *b)
Find out how many items have been added to this bloom filter.
struct bloom_filter * bloom_create(size_t size)
Create a new bloom filter.
void bloom_destroy(struct bloom_filter *b)
Destroy a previously-created bloom filter.
bool bloom_search_str(struct bloom_filter *b, const char *s, size_t z)
Search the filter for the given string, assuming it was added by bloom_insert_str().
void bloom_insert_str(struct bloom_filter *b, const char *s, size_t z)
Insert a string of given length (may include NULs) into the filter, using an internal hash function.
bool bloom_search_hash(struct bloom_filter *b, uint32_t hash)
Search the filter for the given hash value, assuming it was added by bloom_insert_hash().
void bloom_insert_hash(struct bloom_filter *b, uint32_t hash)
Insert a given hash value into the filter, should you already have one to hand.