An open API service indexing awesome lists of open source software.

https://github.com/grasielagomes/bloom-filter-ts

High-performance Bloom Filter implemented in TypeScript for fast membership checks.
https://github.com/grasielagomes/bloom-filter-ts

bitwise bloom-filter data-structures performance typescript

Last synced: over 1 year ago
JSON representation

High-performance Bloom Filter implemented in TypeScript for fast membership checks.

Awesome Lists containing this project

README

          

# ๐ŸŒฑ Bloom Filter in TypeScript

This project implements a simple and efficient **Bloom Filter** using TypeScript. A Bloom Filter is a space-efficient probabilistic data structure used to test whether an element is a member of a set.

> โœ… It *definitely* tells you if an element is not in the set.
> โš ๏ธ It *might* tell you that it is โ€” false positives are possible, but false negatives are not.

---

## โœจ Why is this project important?

- **High performance**: Ideal for handling large-scale datasets, avoiding duplication, or pre-filtering data.
- **Real-world applications**: Used in spam detection, recommendation engines, database optimizations and security systems by companies like Google, LinkedIn and Cloudflare.
- **Showcases technical depth**: Demonstrates understanding of hashing, bitwise operations, and memory-efficient data structures in TypeScript.

---

## ๐Ÿงช Example

```ts
const bloom = new BloomFilter(100, 3);
bloom.add("alice@example.com");

bloom.contains("alice@example.com"); // true
bloom.contains("bob@example.com"); // false or maybe true (false positive)
```