1Xdelta(1)                   General Commands Manual                  Xdelta(1)
2
3
4

NAME

6       xdelta - Invoke Xdelta
7

SYNOPSIS

9       xdelta subcommand [ option...  ] [ operand...  ]
10

DESCRIPTION

12       Xdelta  provides the ability to generate deltas between a pair of files
13       and later apply those deltas.  It operates  similar  to  the  diff  and
14       patch  commands, but works on binary files and does not produce a human
15       readable output.
16
17       Xdelta has three subcommands, delta, patch, and  info.   Delta  accepts
18       two  file versions and produces a delta, while patch accepts the origi‐
19       nal file version and delta and produces the second version.   The  info
20       command  prints useful information about a delta.  Each subcommand will
21       be detailed seperately.
22
23
24   Gzip processing
25       Attempting to compute a delta between compressed  input  files  usually
26       results in poor compression.  This is because small differences between
27       the original contents causes changes in the compression of whole blocks
28       of  data.   To  simplify  things,  Xdelta implements a special case for
29       gzip(1) compressed files.  If any version input to the delta command is
30       recognized  as having gzip compression, it will be automatically decom‐
31       pressed into a temporary location prior to comparison.  This  temporary
32       location  is  either  the  value of the TMPDIR environment variable, if
33       set, otherwise "/tmp".
34
35       The Xdelta patch header contains a  flag  indicating  that  the  recon‐
36       structed  version  should be recompressed after applying the patch.  In
37       general, this allows Xdelta to operate transparently on gzip compressed
38       inputs.
39
40       There  is one potential problem when automatically processing gzip com‐
41       pressed files, which is that the recompressed content does  not  always
42       match  byte-for-byte  with the original compressed content.  The uncom‐
43       pressed content still matches, but if there is  an  external  integrity
44       check  such  as  cryptographic signature verification, it may fail.  To
45       prevent this from happening, the --pristine option  disables  automatic
46       gzip processing.
47
48
49   MD5 integrity check
50       By  default,  Xdelta  always  verifies the MD5 checksum of the files it
51       reconstructs.  This prevents you from supplying an incorrect input dur‐
52       ing  patch, which would result in corrupt output.  Because of this fea‐
53       ture, you can feel confident that patch  has  produced  valid  results.
54       The  --noverify option disables MD5 verification, but this is only rec‐
55       ommended for performance testing.
56
57
58   Compressed patch format
59       Xdelta uses a fairly simple encoding for its delta, then  applies  zlib
60       compression  to  the  result.   You should not have to post-compress an
61       Xdelta delta.
62
63
64   Delta
65       The delta subcommand has the following synopsis:
66
67       xdelta delta [ option...  ] fromfile tofile patchout
68
69       Computes a delta from fromfile to tofile and writes it to patchout
70
71
72   Patch
73       The patch subcommand has the following synopsis:
74
75       xdelta patch [ option...  ] patchin [ fromfile [ tofile ]]
76
77       Applies patchin to fromfile and produces  a  reconstructed  version  of
78       tofile.
79
80       If  fromfile  was omitted, Xdelta attempts to use the original fromfile
81       name, which is stored in the delta.  The from file must be identical to
82       the  one  used to create the delta.  If its length or MD5 checksum dif‐
83       fers, patch will abort with an error message.
84
85       If tofile was omitted, Xdelta attempts to use the original tofile name,
86       which is also stored in the delta.  If the original tofile name already
87       exists, a unique filename extension will be added to  avoid  destroying
88       any existing data.
89
90
91   Info
92       The info subcommand has the following synopsis:
93
94       xdelta info patchinfo
95
96       Prints  information  about  patchinfo  and the version it reconstructs,
97       including file names, lengths, and MD5 checksums.
98
99
100   Options
101       -0..9  Set the zlib compression level.  Zero indicates no  compression.
102              Nine indicates maximum compression.
103
104
105       -h, --help
106              Print a short help message and exit.
107
108
109       -q, --quiet
110              Quiet.  Surpresses several warning messages.
111
112
113       -v, --version
114              Print the Xdelta version number and exit.
115
116
117       -V, --verbose
118              Verbose.  Prints a bit of extra information.
119
120
121       -n, --noverify
122              No verify.  Turns off MD5 checksum verification of the input and
123              output files.
124
125
126       -m=SIZE, --maxmem=SIZE
127              Set an upper bound on the size of an in-memory page cache.   For
128              example, --maxmem=32M will use a 32 megabyte page cache.
129
130
131       -s=BLOCK_SIZE
132              Set the block size, unless it was hard coded (20% speed improve‐
133              ment).  Should be a power of 2.
134
135
136       -p, --pristine
137              Disable the automatic decompression of gzipped inputs,  to  pre‐
138              vent unexpected differences in the re-compressed content.
139
140

RETURN VALUES

142       The  delta  command exits with status 0 to indicate that no differences
143       were found, with status 1 to indicate that some differences were found,
144       and  with  status  2  to indicate an error of some kind.  The patch and
145       info commands exit with status 0 on success and 2 on failure.
146
147

IDENTIFICATION

149       Author: Joshua P. MacDonald, jmacd@cs.berkeley.edu
150       Manual Page Revision: 1.6; Release Date:  Sun,  28  Jan  2007  12:21:11
151       -0800.
152       Copyright © 1997, 1998, 1999, 2000, 2001
153
154
155
156                                                                     Xdelta(1)
Impressum