#bloom-filter #bloom #filter

bloom-filter-rs

A Bloom Filter implementation in Rust

1 unstable release

Uses old Rust 2015

0.1.0 Nov 6, 2018

#41 in #bloom

MIT license

9KB
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

~235KB