Packages / rupm

bloom-tools 0.1.0

Bloom filter: fast probabilistic set membership with sizing by expected items and error rate

Install

cargo add bloom-tools --registry rupm

In Ruststudio: Packages, search for bloom-tools, Install.

Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-22.

Versions

README

# bloom-tools

Bloom filter: fast probabilistic set membership with sizing by expected items and error rate

Add it with `rupm add bloom-tools` (or `cargo add bloom-tools --registry rupm`).

A Bloom filter can report an item as present when it is not (at about the chosen rate) but never the reverse. It is a data structure for speed and memory, not meant for security-critical use (for example as an access check).

```rust
use bloom_tools::BloomFilter;
let mut f = BloomFilter::with_rate(1000, 0.01).unwrap();
f.insert(b"alice");
assert!(f.contains(b"alice"));
assert!(!f.contains(b"bob")); // false positives are possible, false negatives never
```