package
2.14.0
Repository: https://github.com/vitelabs/go-vite.git
Documentation: pkg.go.dev

# Functions

New creates a new Bloom filter optimized to store n items with a specified target false-positive rate.
NewBuckets creates a new Buckets with the provided number of buckets where each bucket is the specified number of bits.
OptimalK calculates the optimal number of hash functions to use for a Bloom filter based on the desired rate of false positives.
OptimalM calculates the optimal Bloom filter size, m, based on the number of items and the desired rate of false positives.

# Structs

Buckets is a fast, space-efficient array of buckets where each bucket can store up to a configured maximum value.
Filter implements a classic thread-safe Bloom filter.