deepfryed/bloom-filter — pull request #2 by eproxus (2013-07-09 15:22:44+00:00)
Title: Add binary dump and load functions

We needed the ability to load a filter bitmap in memory, instead of directly from file. We've added the `binary` attribute which allows one to get and set a bit string containing the filter data.

Example use case:
```ruby
filter = BloomFilter.new bits: 100_000_0, hashes: 4

filter.insert "foo"
binary = filter.binary #=> "\x83Ö\xAC\xEA\u00..."

filter2 = BloomFilter.new bits: 100_000_0, hashes: 4
filter2.binary = binary
filter2.include? "foo" #=> true
filter2.include? "bar" #=> false
```