Bloom filter in Golang with hashing efficiency trick
License
gtank/bloomfilter
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a basic Go implementation of a Bloom filter. I built it to test the idea from Kirsch and Mitzenmacher [1] that you can use two hash functions to simulate an arbitrary number of additional hash functions without losing functionality in a Bloom filter. Cool result: they're right! It is very short code, see tests and comments for more details. ``` set := bloomfilter.NewBloomFilter(1000000, 8192) // elements, false positive rate set.Add([]byte("Hello, world!")) set.Check([]byte("Hello, world!")) // => true set.Check([]byte("String Not-appearing-in-this-set")) // => false ``` [1] http://www.eecs.harvard.edu/~michaelm/postscripts/rsa2008.pdf
About
Bloom filter in Golang with hashing efficiency trick
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published