deltamesh

deltamesh

A streaming diff engine for structured data. Computes minimal patches over JSON, Protobuf and Arrow batches without materialising either side in memory.

Go 1.21+Apache-2.0v1.9.2 · 2026-07-28zero dependencies
QuickstartAPI reference

Constant memory

Both sides are consumed as streams. Peak allocation depends on nesting depth, not on document size — a 4 GB array diffs in under 20 MB.

Order-stable patches

Patches are deterministic for a given input pair, so they hash reproducibly and can be used as cache keys or stored in content-addressed blobs.

Reversible

Every patch carries enough context to be inverted, which makes undo and point-in-time rollback a single call.

Format agnostic

One tree model behind JSON, Protobuf reflection and Arrow. Add your own via the Decoder interface in about 80 lines.

Backpressure aware

The pipeline honours context.Context cancellation at every stage and never buffers more than one record ahead of the consumer.

Tested against fuzz corpora

Roughly 240k seeds in CI, plus differential testing against a naive in-memory implementation on every commit.