Companion

object Companion

Functions

Link copied to clipboard
fun create(expectedElements: Int, falsePositiveRate: Double = 0.01): BloomFilter

Create a BloomFilter sized for expectedElements at the given falsePositiveRate (default 1%). The optimal bit count and hash count are derived from the standard formulas:

Link copied to clipboard
fun fromRaw(bitCount: Int, hashCount: Int, bits: LongArray): BloomFilter

Restore a BloomFilter from raw parameters — useful when deserializing from a format other than the built-in kotlinx-serialization path.