colinsurprenant/bloombroom — pull request #4 by lynxbat (2013-08-11 06:05:46+00:00)
Title: Add CountingBloomFilter

Love this gem but needed a counting filter for some operations that required decrementing from filter.
Took the existing ContinuousBloomFilter and refactored to implement counters.

__Notes__
* Added spec tests but have not touched the benchmarks
* Allows you to pass counter limit in decimal and will use log2 to find a suitable bit bucket size
* Grants control of roll over behavior with counters with `#new`
* Easy to implement simple add/remove existence with `#set(key, 1)` and `#clear(key)`. `#include(key)` will respond with `counter > 0` (true | false)

__Questions__
* Did not implement mutexes like ContinuousBloomFilter, not sure if thread safety is am issue yet with this new class