package main
import (
"github.com/kenju/go-bloomfilter"
)
func main() {
bf := bloomfilter.New(1024)
bf.Add([]byte("foo"))
bf.Add([]byte("bar"))
bf.Add([]byte("buz"))
bf.Size() //=> 3
bf.Test([]byte("foo")) //=> (maybe) true
bf.Test([]byte("bar")) //=> (maybe) true
bf.Test([]byte("buz")) //=> (maybe) true
bf.Test([]byte("hey")) //=> false
bf.Test([]byte("!!!")) //=> false
}
-
Notifications
You must be signed in to change notification settings - Fork 0
kenju/go-bloomfilter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published