Crates.io | bloom-sol |
lib.rs | bloom-sol |
version | 0.0.3 |
created_at | 2025-08-18 14:51:28.486234+00 |
updated_at | 2025-08-18 15:15:21.941256+00 |
description | Counting bloom filter, aimed for solana |
homepage | |
repository | https://github.com/ohaddahan/bloom-sol/tree/master |
max_upload_size | |
id | 1800590 |
size | 11,922 |
A Rust implementation of a counting Bloom filter, specifically designed with Solana blockchain development in mind.
use bloom_sol::bloom_sol::struct_def::CountingBloomFilter;
// Create a new counting bloom filter
let mut filter = CountingBloomFilter::new(1000, 4, false);
// Insert an item
filter.insert(&b"hello world");
// Check membership
let contains = filter.contains(&b"hello world"); // true
let not_contains = filter.contains(&b"goodbye"); // false (or possibly true - false positive)
// Remove an item (only in counting mode)
filter.remove(&b"hello world");
Add this to your Cargo.toml
:
[dependencies]
bloom-sol = "0.0.1"
MIT