XDELTA3(1) General Commands Manual XDELTA3(1)

xdelta3 - VCDIFF (RFC 3284) binary diff tool

xdelta3 [command] [options] [input [output]]

xdelta3 is a binary diff tool that uses the VCDIFF (RFC 3284) format and compression.

prints xdelta3 configuration
decompress the input, also set by -d
compress the input, also set by -e (default)
run the builtin tests
print information about the entire delta
print information about the first window
print information about all windows
encode with new application/secondary settings

standard options:

-0 .. -9
compression level
use stdout
decompress
compress
force overwrite
show help
be quiet
be verbose (max 2)
show version
bytes source window size
bytes input window size
size compression duplicates window
size instruction buffer size (0 = unlimited)
source source file to copy from (if any)
enable/disable secondary compression
disable small string-matching compression
disable external decompression (encode/decode)
disable external recompression (decode)
omit the detected external-compression level from the application header (encode). By default xdelta3 records the level so decode recompresses the output to byte-identical bytes; -G emits a legacy application header that older xdelta3 versions can still recompress.
disable checksum (encode/decode)
disable armor. Armor mode (whole-file BLAKE3 verification) is on by default. When enabled, xdelta3 embeds BLAKE3 digests of the source and target into the application header using the name#blake3 syntax. On encode this requires a seekable source and target; on decode the source is verified before applying and the reconstructed target is verified afterward. If the source is a stream (not seekable) it cannot be verified, so xdelta3 prints a warning and proceeds. If the supplied source already matches the delta's target digest -- i.e. the patch is already applied -- decode reports "already up to date" and exits with status 2. -a disables this and restores the legacy application-header format and the non-seekable streaming behavior. The merge command verifies an armored chain of deltas when every input is armored. Armor verifies the logical (decompressed) content that xdelta3 processes, so it composes correctly with external input decompression and output recompression.
soft config (encode, undocumented)
disable/provide application header (encode)
disable output (check/compute only)
use alternate code table (test)

0
success.
2
the decoded armored delta's source already matches its target digest; the patch is already applied and nothing was done.
1
any other error.

When xdelta3 automatically decompresses an externally compressed input (bzip2, gzip, xz, or compress) it records the detected compression level in the application header and passes it to the recompressor on decode, so the recompressed output reproduces the original compression level. The bzip2 block-size level is recovered exactly; the gzip and xz levels are best-effort guesses from the stream header and may select the format default when the exact level cannot be determined. This makes the application-header compressor field (B, G, Z, Y) optionally carry a trailing level digit, e.g. B9. Use -R to disable recompression, -D to disable decompression entirely, or -G to omit the level from the header for compatibility with older versions.

The XDELTA environment variable may contain extra args:

XDELTA="-s source-x.y.tar.gz" \
tar --use-compress-program=xdelta3 -cf \
target-x.z.tar.gz.vcdiff target-x.y/

Compress the differences between SOURCE and TARGET, yielding OUT, using "djw" secondary compression:

xdelta3 -S djw -s SOURCE TARGET OUT

Do the same, using standard input and output:

xdelta3 -S djw -s SOURCE < TARGET > OUT

To decompress OUT, using SOURCE, yielding TARGET:

xdelta3 -d -s SOURCE OUT TARGET

xdelta3 was written by Josh MacDonald <josh.macdonald@gmail.com>.

This manual page was written by Leo 'costela' Antunes <costela@debian.org> for the Debian project (but may be used by others).

August 2009 Xdelta3