Documentation
¶
Overview ¶
Package bloom implements Bloom filters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter []byte
Filter is an encoded set of []byte keys.
func NewFilter ¶
NewFilter returns a new Bloom filter that encodes a set of []byte keys with the given number of bits per key. The returned Filter may be a sub-slice of buf[:cap(buf)] if it is large enough, otherwise the Filter will be allocated separately.
func (Filter) MayContain ¶
MayContain returns whether the filter may contain given key. False positives are possible, where it returns true for keys not in the original set.
Click to show internal directories.
Click to hide internal directories.