Skip to content

dorkrawk/bloomfilter-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BloomFilter RS

A Bloom filter written in Rust.

last tested with Rust 1.1.0

Example

For a Bloom filter with 100 buckets and 5 hash functions:

let mut bf = BloomFilter::new(100, 5);

bf.insert(&"hamster");
bf.insert(&"coffee");

bf.check(&"hamster");
// true

bf.check(&"oatmeal");
// (probably) false

bf.error_chance();
// 0.000007804244

TODO

  • multiple hash functions
  • error_chance() function
  • handle inserting arbitrary types

note: I mainly built this project to learn a bit about Rust

About

A Bloom Filter made in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •