Versions in this module Expand all Collapse all v3 v3.0.0 Apr 8, 2024 Changes in this version + func OptimalK(fpRate float64) uint + func OptimalM(n uint, fpRate float64) uint + type BucketGetter interface + Get func(bucket uint) uint32 + type Buckets struct + func NewBuckets(count uint, bucketSize uint8) *Buckets + func (b *Buckets) Count() uint + func (b *Buckets) DecodeFrom(data []byte) (int64, error) + func (b *Buckets) Get(bucket uint) uint32 + func (b *Buckets) GobDecode(data []byte) error + func (b *Buckets) GobEncode() ([]byte, error) + func (b *Buckets) Increment(bucket uint, delta int32) *Buckets + func (b *Buckets) MaxBucketValue() uint8 + func (b *Buckets) PopCount() (count int) + func (b *Buckets) ReadFrom(stream io.Reader) (int64, error) + func (b *Buckets) Reset() *Buckets + func (b *Buckets) Set(bucket uint, value uint8) *Buckets + func (b *Buckets) WriteTo(stream io.Writer) (int64, error) + type Checker interface + Test func(data []byte) bool + type Filter interface + Add func([]byte) Filter + TestAndAdd func([]byte) bool + type PartitionedBloomFilter struct + func NewPartitionedBloomFilter(n uint, fpRate float64) *PartitionedBloomFilter + func NewPartitionedBloomFilterWithCapacity(m uint, fpRate float64) *PartitionedBloomFilter + func (p *PartitionedBloomFilter) Add(data []byte) Filter + func (p *PartitionedBloomFilter) Capacity() uint + func (p *PartitionedBloomFilter) Count() uint + func (p *PartitionedBloomFilter) DecodeFrom(data []byte) (int64, error) + func (p *PartitionedBloomFilter) EstimatedFillRatio() float64 + func (p *PartitionedBloomFilter) FillRatio() float64 + func (p *PartitionedBloomFilter) GobDecode(data []byte) error + func (p *PartitionedBloomFilter) GobEncode() ([]byte, error) + func (p *PartitionedBloomFilter) K() uint + func (p *PartitionedBloomFilter) OptimalCount() uint + func (p *PartitionedBloomFilter) ReadFrom(stream io.Reader) (int64, error) + func (p *PartitionedBloomFilter) Reset() *PartitionedBloomFilter + func (p *PartitionedBloomFilter) SetHash(h hash.Hash64) + func (p *PartitionedBloomFilter) Test(data []byte) bool + func (p *PartitionedBloomFilter) TestAndAdd(data []byte) bool + func (p *PartitionedBloomFilter) UpdateCount() float64 + func (p *PartitionedBloomFilter) WriteTo(stream io.Writer) (int64, error) + type ScalableBloomFilter struct + func NewDefaultScalableBloomFilter(fpRate float64) *ScalableBloomFilter + func NewScalableBloomFilter(hint uint, fpRate, r float64) *ScalableBloomFilter + func (s *ScalableBloomFilter) Add(data []byte) Filter + func (s *ScalableBloomFilter) Capacity() uint + func (s *ScalableBloomFilter) DecodeFrom(data []byte) (int64, error) + func (s *ScalableBloomFilter) FillRatio() float64 + func (s *ScalableBloomFilter) GobDecode(data []byte) error + func (s *ScalableBloomFilter) GobEncode() ([]byte, error) + func (s *ScalableBloomFilter) K() uint + func (s *ScalableBloomFilter) ReadFrom(stream io.Reader) (int64, error) + func (s *ScalableBloomFilter) Reset() *ScalableBloomFilter + func (s *ScalableBloomFilter) SetHash(h hash.Hash64) + func (s *ScalableBloomFilter) Test(data []byte) bool + func (s *ScalableBloomFilter) TestAndAdd(data []byte) bool + func (s *ScalableBloomFilter) WriteTo(stream io.Writer) (int64, error)