JSPM

@mrawdon/bloom-filter-native

0.1.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q68791F
  • License BSD-3-Clause

A native implementation of a bloom filter

Package Exports

  • @mrawdon/bloom-filter-native

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mrawdon/bloom-filter-native) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

#Another Native Bloom Filter Wrapper Wraps the libbf and libbloom libraries

//1st argument is error rate second arg is expected # items
const filter = new bff(0.001, 100000);
console.log(filter.lookup("a"))//false
filter.add("a");
console.log(filter.lookup("a"))//true

Notes

Currently libbloom is enabled to swap implementations uncomment line 3 of bloom-napi.h The error rate may need to be flipped when swapping implementations libbf has a max_obj_size currently defined at 36