Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BloomFilter ¶
type BloomFilter struct {
// contains filtered or unexported fields
}
BloomFilter is a basic bloom filter implementation
func NewBloomFilter ¶
func NewBloomFilter(n uint) *BloomFilter
NewBloomFilter returns a new filter with m number of bits available and hints to use k hash functions
func (*BloomFilter) Count ¶ added in v1.6.0
func (f *BloomFilter) Count() int
func (*BloomFilter) Has ¶
func (f *BloomFilter) Has(data []byte) bool
Has returns true if the data is in the BloomFilter, false otherwise. If true, the result might be a false positive. If false, the data is definitely not in the set.
func (*BloomFilter) MayHave ¶ added in v1.4.0
func (f *BloomFilter) MayHave(data []byte) bool
func (*BloomFilter) Set ¶
func (f *BloomFilter) Set(data []byte)
func (*BloomFilter) Size ¶ added in v1.7.0
func (f *BloomFilter) Size() int
func (*BloomFilter) Unset ¶ added in v1.6.0
func (f *BloomFilter) Unset(data []byte)
Click to show internal directories.
Click to hide internal directories.