https://github.com/uri/bloom_filter
A very basic implementation of bloom filters in ruby
https://github.com/uri/bloom_filter
Last synced: 12 months ago
JSON representation
A very basic implementation of bloom filters in ruby
- Host: GitHub
- URL: https://github.com/uri/bloom_filter
- Owner: uri
- License: mit
- Created: 2014-10-20T03:59:14.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-20T04:00:20.000Z (over 11 years ago)
- Last Synced: 2025-05-07T06:08:40.009Z (about 1 year ago)
- Language: Ruby
- Size: 113 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### About
A work in progress inspired by: http://maciejczyzewski.me/2014/10/18/bloom-filters-fast-and-simple.html.
This is probably not production ready and can use a lot of performance enhancements. I merely made this to understand the basics of bloom filters.
### Usage
```ruby
bf = BloomFilter.new
bf.add "test string"
bf.add "qwerty"
puts bf.query "querty" #=> true
puts bf.query "test string" #=> true
puts bf.query "not present" #=> false
```
### Contribute
Any feedback is welcome, fork and distribute at will.