Calculates Bloom filter size and hash count for a target item count and false positive rate.
Expected number of items in the filter.
Desired false positive probability, between 0 and 1.
The filter size in bits and the number of hashes to use.
import { optimal } from '@pacote/bloom-filter'const options = optimal(1000, 0.01) Copy
import { optimal } from '@pacote/bloom-filter'const options = optimal(1000, 0.01)
Calculates Bloom filter size and hash count for a target item count and false positive rate.