import type { Filter } from './index.ts'; export interface BloomFilterOptions { seeds?: number[]; hashes?: number; bits?: number; } export declare class BloomFilter implements Filter { readonly seeds: number[]; readonly bits: number; buffer: Uint8Array; constructor(options?: BloomFilterOptions); /** * Add an item to the filter */ add(item: Uint8Array | string): void; /** * Test if the filter has an item. If it returns false it definitely does not * have the item. If it returns true, it probably has the item but there's * an `errorRate` chance it doesn't. */ has(item: Uint8Array | string): boolean; /** * Reset the filter */ clear(): void; setbit(bit: number): void; getbit(bit: number): boolean; } /** * Create a `BloomFilter` with the smallest `bits` and `hashes` value for the * specified item count and error rate. */ export declare function createBloomFilter(itemCount: number, errorRate?: number): Filter; //# sourceMappingURL=bloom-filter.d.ts.map