Skip to content

Releases: irfansharif/cfilter

v0.1.1

11 Sep 05:11
Compare
Choose a tag to compare

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().

v0.1.0

07 Aug 07:15
Compare
Choose a tag to compare

CFilter currently supports following operations:

  • Insert(item byte[]()): insert an item to the filter
  • Lookup(item byte[]()): return if item is already in the filter (may return false positive results like Bloom filters)
  • Delete(item byte[]()): delete the given item from the filter. Note that to use this method, it must be ensured that this item is in the filter (e.g., based on records on external storage); otherwise, a false item may be deleted.
  • Size(): return the total number of items currently in the filter