bitbloom

Crates.iobitbloom
lib.rsbitbloom
version0.1.1
created_at2025-08-12 13:05:24.972609+00
updated_at2025-08-14 15:43:11.214061+00
descriptionA no_std Bloom filter implementation
homepage
repositoryhttps://github.com/leonzchang/bitbloom.git
max_upload_size
id1791973
size697,568
Leonz (leonzchang)

documentation

https://docs.rs/bitbloom

README

Bitbloom

bitbloom

MIT licensed crates.io docs.rs

A no_std minimal Bloom filter for memory-constrained environment.

Example

Add bitbloom to Cargo.toml:

[dependencies]
bitbloom = "0.1.0"
use bitbloom::Bloom;
use rand_pcg::Pcg64Mcg;
use rand_core::SeedableRng;

// Create a deterministic RNG
let mut rng = Pcg64Mcg::seed_from_u64(42);

// Create a Bloom filter for 1000 items with 1% false positive rate
let mut bloom = Bloom::new_with_rng(1000, 0.01, &mut rng);

// Insert items
bloom.set(&"hello");
bloom.set(&"world");

// Query membership
assert!(bloom.contain(&"hello"));
assert!(!bloom.contain(&"unknown"));

References

Commit count: 0

cargo fmt