An open API service indexing awesome lists of open source software.

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

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.