Categorygithub.com/ethanent/bloomfilter
repositorypackage
0.0.4
Repository: https://github.com/ethanent/bloomfilter.git
Documentation: pkg.go.dev

# README

bloomfilter

Go Bloom Filter implementation, with helper types such as BitVector

Go Reference

Install

go get github.com/ethanent/bloomfilter

Example

bf := bloomfilter.NewBloomFilter(100000, 3)

bf.Add([]byte("hello"))
bf.Add([]byte("morning"))

bf.Probe([]byte("testing"))
// => false
// (definitely not in set)

bf.Probe([]byte("hello"))
// => true
// (possibly in set)