Struct bloomfilter::Bloom [] [src]

pub struct Bloom { /* fields omitted */ }

Bloom filter structure

Methods

impl Bloom
[src]

Create a new bloom filter structure. bitmap_size is the size in bytes (not bits) that will be allocated in memory items_count is an estimation of the maximum number of items to store.

Create a new bloom filter structure. items_count is an estimation of the maximum number of items to store. fp_p is the wanted rate of false positives, in ]0.0, 1.0[

Create a bloom filter structure with an existing state. The state is assumed to be retrieved from an existing bloom filter.

Compute a recommended bitmap size for items_count items and a fp_p rate of false positives. fp_p obviously has to be within the ]0.0, 1.0[ range.

Record the presence of an item.

Check if an item is present in the set. There can be false positives, but no false negatives.

Record the presence of an item in the set, and return the previous state of this item.

Return the bitmap as a vector of bytes

Return the number of bits in the filter

Return the number of hash functions used for check and set

Return the keys used by the sip hasher

Clear all of the bits in the filter, removing all keys from the set