Turnstone Operating System
Loading...
Searching...
No Matches
bloomfilter.h File Reference

bloom filter interface More...

#include <types.h>
#include <data.h>

Macros

#define ___BLOOMFILTER_H   0
 

Typedefs

typedef struct bloomfilter_t bloomfilter_t
 ! bloomfilter_t type
 

Functions

bloomfilter_tbloomfilter_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_tbloomfilter_serialize (bloomfilter_t *bf)
 serialize given bloom filter More...
 
bloomfilter_tbloomfilter_deserialize (data_t *data)
 deserialize given bloom filter More...
 

Detailed Description

bloom filter interface

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Macro Definition Documentation

◆ ___BLOOMFILTER_H

#define ___BLOOMFILTER_H   0

prevent duplicate header error macro

Function Documentation

◆ bloomfilter_add()

boolean_t bloomfilter_add ( bloomfilter_t bf,
data_t data 
)

add given data to bloom filter

Parameters
[in]bfbloom filter
[in]datagiven data
Returns
true if added

◆ bloomfilter_check()

boolean_t bloomfilter_check ( bloomfilter_t bf,
data_t data 
)

check given data in bloom filter

Parameters
[in]bfbloom filter
[in]datagiven data
Returns
true if found

◆ bloomfilter_deserialize()

bloomfilter_t * bloomfilter_deserialize ( data_t data)

deserialize given bloom filter

Parameters
[in]datadata that holds serialized bloom filter
Returns
bloom filter

◆ bloomfilter_destroy()

boolean_t bloomfilter_destroy ( bloomfilter_t bf)

destroy's bloom filter

Parameters
[in]bfbloom filter
Returns
true if succeed.

◆ bloomfilter_new()

bloomfilter_t * bloomfilter_new ( uint64_t  entry_count,
float64_t  error 
)

creates new bloomfilter

Parameters
[in]entry_counthow many entries
[in]errorerror rate for false positive
Returns
bloom filter

◆ bloomfilter_serialize()

data_t * bloomfilter_serialize ( bloomfilter_t bf)

serialize given bloom filter

Parameters
[in]bfbloom filter to serialize
Returns
serialized data