RAA - rbloomfilter/0.4.2:
BloomFilter — A class for making bloomfilters Synopsis #!/usr/bin/ruby -w require 'bloomfilter' bf = BloomFilter.new(1000, 0.01) # 1000 keys, 1% false-positives bf.add("foo") puts "Yup" if bf.has?("foo") Requirements Ruby 1.8 Recommended: BitSet — C extension availabe on the RAA (raa.ruby-lang.org/project/bitset /) BloomFilter will try to load BitSet and if that fails it will fall back to an included, but limited/slower SimpleVector library — this included slow library is not suitable for anything more than just playing around. darcs You can also grab the source from my darcs repository: darcs get http://repos.siaris.net/ruby/BloomFilter
Full article:
http://raa.ruby-lang.org/project/rbloomfilter/0.4.2