1 unstable release
Uses new Rust 2024
| 0.1.0 | Apr 24, 2026 |
|---|
#177 in Compression
550KB
1.5K
SLoC
tardiff
tardiff compares two tar archives, including compressed tar files, and shows
how their entries differ.
Installation
cargo install tardiff
From a local checkout:
cargo install --path .
Usage
cargo run -- <left.tar> <right.tar>
All options:
Compare two tar archives by entry name, size, and checksum
Usage: tardiff [OPTIONS] <LEFT> <RIGHT>
Arguments:
<LEFT> Left-hand archive path
<RIGHT> Right-hand archive path
Options:
-q, --quiet Suppress progress and diff output. Exit status still indicates equality
-c, --compact Use the compact rendering for the selected output mode
-s, --spacious Use the spacious rendering for the selected output mode
-t, --table Render differences as a table
-l, --list Render differences as a single unaligned line per entry
-h, --help Print help
Examples:
cargo run -- archive-a.tar archive-b.tar
cargo run -- --table archive-a.tar archive-b.tar
cargo run -- --table --spacious archive-a.tar archive-b.tar
cargo run -- --list --compact archive-a.tar archive-b.tar
cargo run -- --quiet archive-a.tar archive-b.tar
Screenshot
Exit Codes
0: archives are equal1: archives differ2: application error
Example Archives
This repo includes a generator for sample archives that exercise the major diff paths:
cargo run --bin generate_examples
That writes:
examples/left.tarexamples/right.tar
Then you can try:
cargo run -- examples/left.tar examples/right.tar
cargo run -- --table examples/left.tar examples/right.tar
cargo run -- --table --spacious examples/left.tar examples/right.tar
Dependencies
~12–18MB
~343K SLoC