Documentation ¶
Index ¶
- func EstimateParameters(n uint, fpr float64) (m uint, k uint)
- func VerifyBitArray(dbf *DistBF, elem []byte, b *bitset.BitSet) bool
- type DEncode
- type DistBF
- func (dbf *DistBF) Add(element []byte)
- func (dbf *DistBF) BitArray() *bitset.BitSet
- func (dbf *DistBF) Bytes() ([]byte, error)
- func (dbf *DistBF) GetBitIndices() (indices []uint)
- func (dbf *DistBF) GetElementIndices(elem []byte) (indices []uint)
- func (dbf *DistBF) MapElementToBF(elem, seedValue []byte) (indices []uint)
- func (dbf *DistBF) NumOfHashes() uint
- func (dbf *DistBF) Proof(elem []byte) ([]uint64, bool)
- func (dbf *DistBF) SetBitSet(b *bitset.BitSet)
- func (dbf *DistBF) SetIndices(indices []int)
- func (dbf *DistBF) VerifyElement(elem []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateParameters ¶
EstimateParameters estimates requirements for m and k. Based on https://bitbucket.org/ww/bloom/src/829aa19d01d9/bloom.go
Types ¶
type DistBF ¶
type DistBF struct {
// contains filtered or unexported fields
}
DistBF is the dbf struct
func NewDBFBitSet ¶
func UnmarshalBinary ¶
func (*DistBF) GetBitIndices ¶
GetBitIndices returns the indices of every 1 in the dbf
func (*DistBF) GetElementIndices ¶
GetElementIndices returns the dbf indices an element would have if mapped to the dbf
func (*DistBF) MapElementToBF ¶
MapElementToBF returns the indices an element would have if mapped to a dbf, but with a different seedValue
func (*DistBF) NumOfHashes ¶
func (*DistBF) SetIndices ¶
SetIndices increments bit array values without inserting an element.
func (*DistBF) VerifyElement ¶
VerifyElement returns true if element is in DBF, false otherwise
Click to show internal directories.
Click to hide internal directories.