2 releases

new 0.1.1 Mar 28, 2025
0.1.0 Mar 27, 2025

#958 in Data structures

26 downloads per month

MIT license

9KB
166 lines

Bloom Filter (concurrent-bloom-rs)

A concurrent Bloom filter implementation in Rust, designed for efficiency and thread safety.

Features

  • Lock-free, thread-safe operations
  • Optimized bit array and hashing
  • Supports: insertion, membership checking, and reset

Usage

Creating a Bloom Filter

let bloom = Bloom::new(1000, 0.01);

Inserting an Item

bloom.insert("example");

Checking for Membership

if bloom.contains("example") {
    println!("Item might be present");
} else {
    println!("Item is definitely not present");
}

Resetting the Filter

bloom.reset();

License

MIT

Dependencies

~2.5–3.5MB
~60K SLoC