Skip to content

v0.1.1

Latest
Compare
Choose a tag to compare
@irfansharif irfansharif released this 11 Sep 05:11
· 5 commits to master since this release

Added configuration options to the API to support supplied hashing
functions, configurable filter sizes, bucket sizes and fingerprint
sizes. Additionally there is the option to specify maximum number of
kicks displacing fingerprints from their buckets. They are to be
provided to cfilter.New(opts ...options) and are as follows:

  - cfilter.Size(uint) sets the number of buckets in the filter
  - cfilter.BucketSize(uint8) sets the size of each bucket
  - cfilter.FingerprintSize(uint8) sets the size of the fingerprint
  - cfilter.MaximumKicks(uint) sets the maximum number of bucket kicks
  - cfilter.HashFn(hash.Hash) sets the fingerprinting hashing function

NOTE: this commit introduces a change to the API, in order to retrieve
the number or items currently in the filter instead of cf.Size() you
would now use cf.Count().