UNPKG

576 BMarkdownView Raw
1# Bloem - Bloom Filter for node.js
2
3Bloem implements a Bloom Filter for node.js.
4It uses the FNV Hash function and the optimization described in [[1](#lesshash)] by Kirsch and Mitzenmacher.
5
6
7## Install
8
9 npm install bloem
10
11## Usage
12
13 var Bloem = require('bloem')
14 var filter = new Bloem.Bloem(16, 2)
15 filter.has(Buffer("foobar")) // false
16 filter.add(Buffer("foobar"))
17 filter.has(Buffer("foobar")) // true
18 filter.has(Buffer("hello world")) // false
19
20## References
21
22<a name="lesshash">
23[1] <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.72.2442&rep=rep1&type=pdf>
\No newline at end of file