Documentation ¶
Index ¶
Constants ¶
View Source
const ( BUCKET_SIZE = 16 // increasing bucket_size will reduce query message size but increase response message size MAX_KICK_NUM = 1024 // Max number of kicks allowed FP_SEED = 2020 // Seeds for calculating fingerprints (SHA256) CAPACITY_FACTOR = 0.95 // Increase the filter's size by a factor to allow better capacity )
Variables ¶
This section is empty.
Functions ¶
func GetBucketSize ¶
func GetBucketSize() int
Types ¶
type CFilter ¶
type CFilter struct {
// contains filtered or unexported fields
}
func InitCFilter ¶
This function initializes a filter given the size of input set
func (*CFilter) Filter2Bytes ¶
This function encode the current filter into []bytes
func (*CFilter) GetNumBuckets ¶
This function returns # of buckets
Click to show internal directories.
Click to hide internal directories.