Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter represents a scalable bloom filter.
func NewFilter ¶
NewFilter returns a scalable bloom filter with a false positive probaility less than 1/2**k. It starts with a default size of 1024 bits per k. If you know you will use more/less than that, use NewSizedFilter for a better hint. It uses the provided hash to operate.
func NewSizedFilter ¶
NewSizedFilter returns a scalable bloom filter with a false positive probability less than 1/2**k. It start with a default size of 2**log bits per k. It uses the provided hash to operate.
func (*Filter) Add ¶
Add adds the slice of bytes to the filter so that it will always return true when looked up.
func (*Filter) GobDecode ¶
GobDecode sets the filters state to the gob marshalled value in the buffer.