| XDELTA3(1) | General Commands Manual | XDELTA3(1) |
NAME
xdelta3 - VCDIFF (RFC 3284) binary diff tool
SYNOPSIS
xdelta3 [command] [options] [input [output]]
DESCRIPTION
xdelta3 is a binary diff tool that uses the VCDIFF (RFC 3284) format and compression.
COMMANDS
- config
- prints xdelta3 configuration
- decode
- decompress the input, also set by -d
- encode
- compress the input, also set by -e (default)
- test
- run the builtin tests
- printdelta
- print information about the entire delta
- printhdr
- print information about the first window
- printhdrs
- print information about all windows
- recode
- encode with new application/secondary settings
OPTIONS
standard options:
- -0 .. -9
- compression level
- -c
- use stdout
- -d
- decompress
- -e
- compress
- -f
- force overwrite
- -h
- show help
- -q
- be quiet
- -v
- be verbose (max 2)
- -V
- show version
- memory options:
- -B
- bytes source window size
- -W
- bytes input window size
- -P
- size compression duplicates window
- -I
- size instruction buffer size (0 = unlimited)
- compression options:
- -s
- source source file to copy from (if any)
- -S [djw]
- enable/disable secondary compression
- -N
- disable small string-matching compression
- -D
- disable external decompression (encode/decode)
- -R
- disable external recompression (decode)
- -G
- 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.
- -n
- disable checksum (encode/decode)
- -a
- 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.
- -C
- soft config (encode, undocumented)
- -A [apphead]
- disable/provide application header (encode)
- -J
- disable output (check/compute only)
- -T
- use alternate code table (test)
EXIT STATUS
- 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.
NOTES
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:
tar --use-compress-program=xdelta3 -cf \
target-x.z.tar.gz.vcdiff target-x.y/
EXAMPLES
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
AUTHOR
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 |