atbf
This package provides a simple attenuated bloom filter. An attenuated bloom filter is a series of bloom filters that can be used to represent items in sets over a sort of distance plot. This is useful in particular for things like Quasar where each bloom filter in the set is used to represent topics to which peers N hops aways are subscribed.
Usage
npm install atbf --save
const AttenuatedBloomFilter = ;const atbf = bitfieldSize: 160 filterDepth: 3 ; atbf0;atbf0; // trueatbf0; // false
The AttenuatedBloomFilter
object extends Array
, so the usual suspects like
map
, forEach
, etc are available.
License
GNU Lesser General Public License 3.0