Documentation
¶
Index ¶
Constants ¶
const ARITY = 3
const SEGMENT_COUNT = 100
const SLOTS = SEGMENT_COUNT + ARITY - 1
Variables ¶
var MaxIterations = 1024
The maximum number of iterations allowed before the populate function returns an error
Functions ¶
This section is empty.
Types ¶
type BinaryFuse8 ¶
type BinaryFuse8 struct {
Seed uint64
SegmentLength uint32
SegmentLengthMask uint32
SegmentCount uint32
SegmentCountLength uint32
Fingerprints []uint8
}
func PopulateBinaryFuse8 ¶
func PopulateBinaryFuse8(keys []uint64) (*BinaryFuse8, error)
PopulateBinaryFuse8 fills the filter with provided keys. For best results, the caller should avoid having too many duplicated keys. The function may return an error if the set is empty.
func (*BinaryFuse8) Contains ¶
func (filter *BinaryFuse8) Contains(key uint64) bool
Contains returns `true` if key is part of the set with a false positive probability of <0.4%.
type Fuse8 ¶
The Fuse8 xor filter uses 8-bit fingerprints. It offers the same <0.4% false-positive probability as the xor filter, but uses less space (~9.1 bits/entry vs ~9.9 bits/entry).
The Fuse8 xor filter uses the fuse data structure, which requires a large number of keys to be operational. Experimentally, this number is somewhere >1e5. For smaller key sets, prefer thhe Xor8 filter.
For more information on the fuse graph data structure, see https://arxiv.org/abs/1907.04749. This implementation is referenced from the C implementation at https://github.com/FastFilter/xor_singleheader/pull/11.
func PopulateFuse8 ¶
Populate fills the filter with provided keys. For best results, the caller should avoid having too many duplicated keys. The function may return an error if the set is empty.