Skip to content

A opposite to bloom filter implemented by hash table without dealing with hash collision.

Notifications You must be signed in to change notification settings

HoMuChen/opp-bloom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opp-bloom

This is a opposite to bloom filter implemented by hash table without dealing with hash collision.

Opposite to a bloom filter.False negative matched are possible, but false positives are not.

In other words, a query returns either "definitely in set" or "possibly not in set".

Usage

go get github.com/HoMuChen/opp-bloom
import "github.com/HoMuChen/opp-bloom"

//create a set with fixed size array
set := oppbloom.New(1000000)

Add

Add function add a key into the set

set.Add([]byte(`some key`))
set.Add([]byte(`another key`))

Contain

Contain function return if a key is in the set.

if true, the key must be in the set.

if false, the key might not in the set.

set.Contain([]byte(`some key`)) //true
set.Contain([]byte(`another key`)) //false

About

A opposite to bloom filter implemented by hash table without dealing with hash collision.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages