Bloom filter API. More...
Bloom filter API.
Definition in file bloom.h.
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | bloom_t |
bloom_t bloom filter object More... | |
Typedefs | |
typedef uint32_t(* | hashfp_t) (const uint8_t *, size_t len) |
hash function to use in thee filter | |
Functions | |
void | bloom_init (bloom_t *bloom, size_t size, uint8_t *bitfield, hashfp_t *hashes, int hashes_numof) |
Initialize a Bloom Filter. | |
void | bloom_del (bloom_t *bloom) |
Delete a Bloom filter. | |
void | bloom_add (bloom_t *bloom, const uint8_t *buf, size_t len) |
Add a string to a Bloom filter. | |
bool | bloom_check (bloom_t *bloom, const uint8_t *buf, size_t len) |
Determine if a string is in the Bloom filter. | |