Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Bloem implements three Bloom Filters for node.js. All use the FNV Hash function and the optimization described in [1] by Kirsch and Mitzenmacher.
npm install bloem
var bloem = require('bloem')
var filter = new bloem.Bloem(16, 2)
filter.has(Buffer("foobar")) // false
filter.add(Buffer("foobar"))
filter.has(Buffer("foobar")) // true
filter.has(Buffer("hello world")) // false
var bloem = require('bloem')
var filter = new bloem.SafeBloem(2, 0.1)
filter.add(Buffer("1")) // true
filter.add(Buffer("2")) // true
filter.add(Buffer("3")) // false
filter.has(Buffer("3")) // false
filter.has(Buffer("1")) // true
size
Number - bits in the bitfieldslices
Number - how many hashfunctions to useCreate a new Bloem filter object.
key
Buffer - key to addAdd a key to the set
key
BufferTest if key is in the set
capacity
Number - capacity of the filtererror_rate
NumberCreate a new bloom filter that can hold capacity
elements with an error probability of error_rate
.
key
Buffer - key to addAdd a key to the set. Returnes true on success and false if the filter is full.
key
BufferTest if key is in the set
error_rate
NumberCreates an instance of a scaling bloom filter. Accepts a "options" Object that takes the following values:
initial_capacity
- the capacity of the first filter. Default: 1000scaling
- the scaling factor. Use 2 here for less space usage but higher cpu usage or 4 for higher space, but lower cpu usage. Default: 2ratio
- tightening ratio with 0 < ratio < 1. Default: 0.9key
Buffer - key to addAdd a key to the set
key
BufferTest if key is in the set
FAQs
Bloom Filter using the FNV hash function
The npm package bloem receives a total of 653 weekly downloads. As such, bloem popularity was classified as not popular.
We found that bloem demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.