Skip to content

riobard/go-bloom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bloom Filter using double hashing.

func doubleFNV(b []byte) (uint64, uint64) {
    hx := fnv.New64()
    hx.Write(b)
    x := hx.Sum64()
    hy := fnv.New64a()
    hy.Write(b)
    y := hy.Sum64()
    return x, y
}

bf := bloom.New(1000000, 0.0001, doubleFNV)
bf.Add([]byte("hello"))
bf.Test([]byte("hello"))
bf.Test([]byte("world"))

About

Bloom filter in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages