← 返回命令列表

Linux command

xdelta3 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Create delta

xdelta3 -e -s [old_file] [new_file] [patch.xd3]

Apply patch

xdelta3 -d -s [old_file] [patch.xd3] [new_file]

High compression

xdelta3 -9 -e -s [old_file] [new_file] [patch.xd3]

Encode to stdout (for piping)

xdelta3 -e -c -s [old_file] [new_file] > [patch.xd3]

Show delta information

xdelta3 printdelta [patch.xd3]

Decode without source

xdelta3 -d [patch.xd3] [output_file]

说明

xdelta3 creates and applies binary delta patches using the VCDIFF format defined in RFC 3284. Encoding compares a source file with a target file and produces a compact delta that captures only the differences, while decoding reconstructs the target by applying the delta to the original source. Compression levels from 0 to 9 trade processing speed for smaller delta sizes. A streaming mode processes data in chunks, enabling memory-efficient handling of very large files. Self-contained patches can be created without requiring the original source file for decoding, embedding the necessary data within the delta itself.

参数

-e
Encode (compress/create delta).
-d
Decode (decompress/apply delta).
-s _FILE_
Source file to copy from.
-0 to -9
Compression level.
-f
Force overwrite of existing files.
-c
Output to stdout.
-v
Verbose output (may be specified up to 2 times).
-q
Quiet, suppress output messages.
-B _bytes_
Source window size.
-W _bytes_
Input window size.
-S djw|fgk
Enable/disable secondary compression.
-n
Disable checksum.
-V
Show version.

FAQ

What is the xdelta3 command used for?

xdelta3 creates and applies binary delta patches using the VCDIFF format defined in RFC 3284. Encoding compares a source file with a target file and produces a compact delta that captures only the differences, while decoding reconstructs the target by applying the delta to the original source. Compression levels from 0 to 9 trade processing speed for smaller delta sizes. A streaming mode processes data in chunks, enabling memory-efficient handling of very large files. Self-contained patches can be created without requiring the original source file for decoding, embedding the necessary data within the delta itself.

How do I run a basic xdelta3 example?

Run `xdelta3 -e -s [old_file] [new_file] [patch.xd3]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -e do in xdelta3?

Encode (compress/create delta).