delta-compression 0.5.0

Binary delta compression — diff and apply for byte sequences, with rolling-hash matching, splay-tree indexing, and in-place patching.
Documentation
  • Coverage
  • 49.22%
    63 out of 128 items documented0 out of 50 items with examples
  • Size
  • Source code size: 191.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.43 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 20s Average build duration of successful builds.
  • all releases: 20s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • darrelllong/Delta-Compression
    4 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • darrelllong

delta-compression

Binary delta compression in pure, safe Rust. Computes a delta — a compact wire-format patch — from a source byte sequence to a target byte sequence, and applies the delta to recover target from source. Supports in-place patching against a single buffer when the delta was emitted with the INPLACE flag set.

Three diff algorithms are provided:

  • diff_greedy — greedy maximal-match heuristic; fastest, larger output.
  • diff_onepass — single-pass scan with rolling-hash matching; good time-vs-size balance.
  • diff_correcting — two-pass with optimisation pass; smallest output, slowest.

The library is also reachable as a CLI:

cargo install delta-compression
delta diff   source.bin target.bin patch.delta
delta apply  source.bin patch.delta  recovered.bin

This is the Rust port of the multi-language reference implementation at https://github.com/darrelllong/delta-compression; the C, C++, Go, Java, and Python ports live in sibling src/<lang>/ directories in that repo.

Licence

BSD 2-Clause. See LICENSE.