blomma
Bloom filters yet again
Last updated 5 years ago by krlkrl .
MIT · Original npm · Tarball · package.json
$ cnpm install blomma 
SYNC missed versions from official npm registry.

blomma

Bloom filters in javascript yet again.

I wanted something that used buffers directly, and that also supports merging and subset tests.

usage

var bloom = require('blomma')(32, 3)

var filter = bloom.empty()

filter.add('hello')

filter.has('hello') // => true
filter.has('goodbye') // => false

bloom

The top level object methods:

empty()

Returns a new empty filter

clone (filter)

Returns a clone

merge (filter1, filter2)

Returns a filter that is a and b merged together with OR

filter

add (string)

Adds the string to the bloom filter

has (string)

Returns false if not in the set, true if it might be

contains (subset)

Returns true if the filter contains everything that subset contains (and possibly more)

License

MIT

Current Tags

  • 1.1.0                                ...           latest (5 years ago)

5 Versions

  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)

Copyright 2014 - 2016 © taobao.org |