Expand description
§rustywallet-bloom
Fast and memory-efficient Bloom Filter implementation optimized for large datasets like cryptocurrency address lookups.
§Features
- Memory efficient: ~1.2 bytes per item at 1% false positive rate
- Fast: Uses FNV-1a hash with double hashing technique
- No dependencies: Pure Rust implementation
- Streaming insert: Load millions of items efficiently
§Example
use rustywallet_bloom::BloomFilter;
// Create filter for 1 million items with 1% false positive rate
let mut bloom = BloomFilter::new(1_000_000, 0.01);
bloom.insert("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");
bloom.insert("bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4");
assert!(bloom.contains("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"));
assert!(!bloom.contains("not_in_filter")); // probably falseModules§
- prelude
- Prelude module for convenient imports
Structs§
- Bloom
Filter - A space-efficient probabilistic data structure for set membership testing.