xdelta是用於delta編碼的命令行程序,用於生成兩個文件之間的差異。這類似於diff和patch,但它針對二進製文件,並且不會生成人類可讀的輸出。它於1997年首次發布。xdelta的開發者是Joshua MacDonald,他目前正在維護該程序。
—— Introduction from Google

软件自带帮助(English)


X:\>xdelta3-3.0.11-x86_64.exe -h

Xdelta version 3.0.11, Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Joshua MacDonald
Xdelta comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see "COPYING" for details.
usage: xdelta3 [command/options] [input [output]]
make patch:

xdelta3.exe -e -s old_file new_file delta_file

apply patch:

xdelta3.exe -d -s old_file delta_file decoded_new_file

special command names:

config      prints xdelta3 configuration
decode      decompress the input
encode      compress the input
test        run the builtin tests

special commands for VCDIFF inputs:

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
merge       merge VCDIFF inputs (see below)

merge patches:

xdelta3 merge -m 1.vcdiff -m 2.vcdiff 3.vcdiff merged.vcdiff

standard options:
-0 .. -9 compression level
-c use stdout
-d decompress
-e compress
-f force (overwrite, ignore trailing garbage)
-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 [lzma|djw|fgk] enable/disable secondary compression
-N disable small string-matching compression
-D disable external decompression (encode/decode)
-R disable external recompression (decode)
-n disable checksum (encode/decode)
-C soft config (encode, undocumented)
-A [apphead] disable/provide application header (encode)
-J disable output (check/compute only)
-m arguments for "merge"
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


压缩示例:

xdelta3 -s SOURCE TARGET > OUT
xdelta3 -s SOURCE TARGET OUT
xdelta3 -s SOURCE < TARGET > OUT
解压缩示例:

xdelta3 -d -s SOURCE OUT > TARGET
xdelta3 -d -s SOURCE OUT TARGET
xdelta3 -d -s SOURCE < OUT > TARGET

最后修改:2020 年 07 月 06 日
如果觉得我的文章对你有用,请随意赞赏