https://github.com/robotomize/rs-bf
An lightweight Bloom Filter implementation in Rust
https://github.com/robotomize/rs-bf
bloom-filter hash rust rust-lang
Last synced: about 2 months ago
JSON representation
An lightweight Bloom Filter implementation in Rust
- Host: GitHub
- URL: https://github.com/robotomize/rs-bf
- Owner: robotomize
- License: mit
- Created: 2024-02-19T19:54:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-18T06:32:58.000Z (6 months ago)
- Last Synced: 2025-02-08T14:15:57.626Z (4 months ago)
- Topics: bloom-filter, hash, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bf
This project provides a simple and efficient implementation of a Bloom Filter in the Rust programming language. A Bloom Filter is a data structure that allows for fast membership queries in a set with minimal memory usage.## Why
This is a learning project, I'm trying to use rust.## Features
* Ease of Use: A straightforward and easy-to-understand API for adding and checking elements.
* Efficiency: Uses minimal memory, making it ideal for large datasets.
* Testing: Includes a suite of tests to ensure correct operation.## Installation
Add the following dependency to your Cargo.toml:
```toml
[dependencies]
rust-bloom-filter = "0.1.0"```
## Example Usage```rust
use rust_bloom_filter::BloomFilter;fn main() {
let mut bloom_filter = BloomFilter::new(10000, 3);
bloom_filter.add("hello");
bloom_filter.add("world");
println!("Contains 'hello': {}", bloom_filter.contains("hello"));
println!("Contains 'world': {}", bloom_filter.contains("world"));
println!("Contains 'foo': {}", bloom_filter.contains("foo"));
}```