Turnstone Operating System
|
bloom filter implementation More...
#include <bloomfilter.h>
#include <math.h>
#include <xxhash.h>
#include <memory.h>
#include <random.h>
Classes | |
struct | bloomfilter_t |
bloom filter struct More... | |
Typedefs | |
typedef struct bloomfilter_t | bloomfilter_t |
Functions | |
MODULE ("turnstone.lib") | |
boolean_t | bloomfilter_check_or_add (bloomfilter_t *bf, data_t *data, boolean_t add) |
checks or adds given value to the given bloom filter More... | |
bloomfilter_t * | bloomfilter_new (uint64_t entry_count, float64_t error) |
creates new bloomfilter More... | |
boolean_t | bloomfilter_destroy (bloomfilter_t *bf) |
destroy's bloom filter More... | |
boolean_t | bloomfilter_check (bloomfilter_t *bf, data_t *data) |
check given data in bloom filter More... | |
boolean_t | bloomfilter_add (bloomfilter_t *bf, data_t *data) |
add given data to bloom filter More... | |
data_t * | bloomfilter_serialize (bloomfilter_t *bf) |
serialize given bloom filter More... | |
bloomfilter_t * | bloomfilter_deserialize (data_t *data) |
deserialize given bloom filter More... | |
bloom filter implementation
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.
boolean_t bloomfilter_add | ( | bloomfilter_t * | bf, |
data_t * | data | ||
) |
add given data to bloom filter
[in] | bf | bloom filter |
[in] | data | given data |
boolean_t bloomfilter_check | ( | bloomfilter_t * | bf, |
data_t * | data | ||
) |
check given data in bloom filter
[in] | bf | bloom filter |
[in] | data | given data |
boolean_t bloomfilter_check_or_add | ( | bloomfilter_t * | bf, |
data_t * | data, | ||
boolean_t | add | ||
) |
checks or adds given value to the given bloom filter
[in] | bf | bloom filter |
[in] | data | data to add |
[in] | add | if true then add or check only |
bloomfilter_t * bloomfilter_deserialize | ( | data_t * | data | ) |
deserialize given bloom filter
[in] | data | data that holds serialized bloom filter |
boolean_t bloomfilter_destroy | ( | bloomfilter_t * | bf | ) |
destroy's bloom filter
[in] | bf | bloom filter |
bloomfilter_t * bloomfilter_new | ( | uint64_t | entry_count, |
float64_t | error | ||
) |
creates new bloomfilter
[in] | entry_count | how many entries |
[in] | error | error rate for false positive |
data_t * bloomfilter_serialize | ( | bloomfilter_t * | bf | ) |
serialize given bloom filter
[in] | bf | bloom filter to serialize |