#bloomfilter #bloom #filter #bloom-filter

bloom-filter-rs

A Bloom Filter implementation in Rust

1 unstable release

new 0.1.0 Nov 6, 2018

#8 in #bloom

Download history 7/week @ 2018-11-07

2 downloads per month

MIT license

8KB
119 lines

Bloom Filter

Build Status

A Bloom Filter implementation in Rust.

Installation

[dependencies]
bloom-filter-rs = "0.1"

Usage

extern crate bloom_filter_rs as bloom_filter;

use std::vec::Vec;
use bloom_filter::{BloomFilter, Murmur3};

let words = vec!["Hello", "I", "am", "some", "words"];

let mut bloom_filter = BloomFilter::optimal(Murmur3, words.len() as u64, 0.01);

bloom_filter.insert_all(&words);

for word in words.iter() {
    assert!(bloom_filter.contains(&word));
}

lib.rs:

Implementation of a BloomFilter

Dependencies

~193KB