A streaming diff engine for structured data. Computes minimal patches over JSON, Protobuf and Arrow batches without materialising either side in 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.
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.
Every patch carries enough context to be inverted, which makes undo and point-in-time rollback a single call.
One tree model behind JSON, Protobuf reflection and Arrow. Add your own via the Decoder interface in about 80 lines.
The pipeline honours context.Context cancellation at every stage and never buffers more than one record ahead of the consumer.
Roughly 240k seeds in CI, plus differential testing against a naive in-memory implementation on every commit.