bloom.h File Reference

Bloom filter API. More...

Detailed Description

Bloom filter API.

Christian Mehlis

Definition in file bloom.h.

#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
+ Include dependency graph for bloom.h:

Go to the source code of this file.

Data Structures

struct  bloom_t
 bloom_t bloom filter object More...


typedef uint32_t(* hashfp_t) (const uint8_t *, int len)
 hash function to use in thee filter


void bloom_init (bloom_t *bloom, size_t size, uint8_t *bitfield, hashfp_t *hashes, int hashes_numof)
 Initialize a Bloom Filter. More...
void bloom_del (bloom_t *bloom)
 Delete a Bloom filter. More...
void bloom_add (bloom_t *bloom, const uint8_t *buf, size_t len)
 Add a string to a Bloom filter. More...
bool bloom_check (bloom_t *bloom, const uint8_t *buf, size_t len)
 Determine if a string is in the Bloom filter. More...