Cuckoo Hit Counter
https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf
Rationale
Cuckoo filter are a really good means of storing set memberships for large datasets in a space efficient manner. Sometimes we don't want to just test membership but also count accesses for large datasets in a space efficient manner. This is an attempt at solving that problem. Specifically for use in The Owner Free File System where it is used in combination with the fibonacci series to determine how the network grows.
Install
npm install cuckoo-hit-counter
Usage
const CuckooHitCounter = let cuckoo= 200 4 2 // (Size, Bucket Size, Finger Print Size) console//(buffer|string|number) returns true if successfulconsole// true: She's definately in thereconsole// 0: A Fibonacci rank of 0console// 0: A Tally of 0 hitsconsole // 1console//false He's not homeconsole // true less than 95% fulllet json = cuckoo // serialize to json objectlet cbor = cuckoo // serialize to cbor
Note
Size your buckets and fingerprints to avoid collisions.