Probabilistic structures that trade a little certainty for a lot less memory, and say exactly how much.

$npm i distillate
Read the docs

The specifics

01

Zero false negatives

Every inserted key answers yes, guaranteed by construction, not by sample.

02

Tunable false-positive rate

Set the target; the sizing calculator picks bits/key to hit it.

03

~75x lookup throughput

Same space, same accuracy, ~75x the lookup throughput of bloom-filters.

04

Runs anywhere

Node 22+, Bun, Deno, browsers, Cloudflare and Vercel edge. Zero runtime dependencies.

05

Portable binary format

Versioned toBytes / fromBytes; a filter built in one runtime loads in another.

06

Tree-shakable

Each structure ships its own subpath import, so a bundler only keeps what you use.

07

TypeScript-first

Typed end to end, zero dependencies, nothing pulled in.

08

CI-gated correctness

Property tests plus a statistical validation gate on every push.

09

Interactive Playground

Build real filters in the browser; watch the guarantee before installing.

Structures, at a glance

distillate/bloom→

Classic Bloom

9.59

bits/key @ 1% target

zero false negatives

distillate/blocked→

Blocked Bloom

10.2

bits/key @ 1% target

zero false negatives

distillate/fuse→

Binary Fuse 8

9.50

bits/key @ 100k, 0.39% fixed

zero false negatives

distillate/fuse→

Binary Fuse 16

19.0

bits/key @ 100k, ~0.0015% fixed

zero false negatives

distillate/scalable→

Scalable Bloom

13.5

bits/key, first stage @ 1% target

grows past n, holds the target

distillate/cuckoo→

Cuckoo

10.7

bits/key @ 1% target

supports delete

Sketch, not a filter

distillate/hll→

HyperLogLog

12 KiB

memory

~0.8%

error

Sketch, not a filter

distillate/countmin→

Count-Min

74 KiB

memory

≤0.1%

of total, over

Sketch, not a filter

distillate/topk→

Top-K

6 KiB

table, plus keys

≤1%

of total, over

Sketch, not a filter

distillate/ddsketch→

DDSketch

≤1%

relative error

exact

merges

Sketch, not a filter

distillate/kll→

KLL

±1.33%

rank error, any values

4.9 KB

at the default k

Sketch, not a filter

distillate/minhash→

MinHash

540 B

signature, k=128

≤0.044

std error

Sketch, not a filter

distillate/theta→

Theta

A ∩ B

counted, with bounds

exact

up to k keys

Reconciliation, not a filter

distillate/riblt→

RIBLT

~27 B

per differing key

exact

difference

A false positive is the filter working, not a bug. These structures trade exactness for space: a key that was never inserted can still answer yes, at roughly the target rate. What they never do is the reverse.