Skip to content

sds: port probabilities table and BloomFilter constructor from nim-sds #2225

@adklempner

Description

@adklempner

Port the core probability tables and BloomFilter constructor from nim-sds to TypeScript.

  1. Port the probability lookup tables from nim-sds as typed arrays
  2. Implement getMOverNBitsForK() helper function to determine optimal bits/element
  3. Create BloomFilter class with constructor that:
    • Takes capacity and error rate parameters
    • Supports optional k-hash override
    • Supports optional bits-per-element override
    • Calculates optimal parameters when not specified
    • Initializes backing bit array storage

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions