bloom_filter

Crates.iobloom_filter
lib.rsbloom_filter
version0.1.0
sourcesrc
created_at2016-12-12 01:24:53.73052
updated_at2016-12-12 01:24:53.73052
descriptionA bloom filter implementation
homepagehttps://github.com/jeromefroe/bloom_filter
repositoryhttps://github.com/jeromefroe/bloom_filter.git
max_upload_size
id7546
size13,643
Jerome Froelich (jeromefroe)

documentation

https://docs.rs/bloom_filter/

README

Bloom Filter

Build Status Coverage Status License

An implementation of a bloom filter as as described in [Space/Time Trade-offs in Hash Coding with Allowable Errors] (http://dmod.eu/deca/ft_gateway.cfm.pdf).

Example

extern crate bloom_filter;

use bloom_filter::BloomBuilder;

fn main() {
    let elements = 2u64.pow(20);
    let fpr = 0.01;
    let mut bloom = BloomBuilder::new(elements).with_fpr(fpr).finish().unwrap();

    bloom.insert("foo");
    bloom.insert("bar");
    bloom.insert("baz");

    if bloom.lookup("foo") {
        println!("found foo in the bloom filter");
    }
}
Commit count: 16

cargo fmt