Skip to content

sds: Implement insert and lookup operations for BloomFilter #2227

@adklempner

Description

@adklempner
  1. Implement insert method in BloomFilter that:

    • Accepts string or Uint8Array input
    • Generates k hash values for the input
    • Sets corresponding bits in the backing array
    • Handles bit array bounds correctly
    • Is efficient for repeated insertions
  2. Implement lookup method in BloomFilter that:

    • Accepts string or Uint8Array input
    • Generates same k hash values as insert
    • Checks all corresponding bits in backing array
    • Returns false if any required bit is not set
    • Returns true if all required bits are set

The implementation should match the behavior of the nim-sds reference implementation.

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