bitbloom
A no_std
minimal Bloom filter for memory-constrained environment.
Example
Add bitbloom
to Cargo.toml
:
[]
= "0.1.0"
use Bloom;
use Pcg64Mcg;
use SeedableRng;
// Create a deterministic RNG
let mut rng = seed_from_u64;
// Create a Bloom filter for 1000 items with 1% false positive rate
let mut bloom = new_with_rng;
// Insert items
bloom.set;
bloom.set;
// Query membership
assert!;
assert!;