My favorites | Sign in
Project Logo
                
Search
for
Updated Jan 21, 2007 by josh.macdonald
Labels: Featured
CommandLineSyntax  
Command-line flags and usage.

Introduction

The command-line syntax is like gzip, with the additional option -s SOURCE.

Like gzip, -d means to decompress. The default mode (-e) is to compress.

For output, -c and -f flags behave likewise (use standard output, force overwrite).

Unlike gzip, xdelta3 defaults to stdout (instead of having an automatic extension).

Without -s SOURCE, xdelta3 behaves like gzip for stdin/stdout purposes.

Compress examples:

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

Decompress examples:

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

There are several special command names, such as xdelta3 printdelta and xdelta3 test.

usage: xdelta3 [command/options] [input [output]]
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
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
compression options:
   -s source    source file to copy from (if any)
   -S [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)

The -A flag may be used to set application-specific data in the VCDIFF header (you may view with xdelta3 printhdr). By default, the application-specific data includes the source and input filenames, as well as descriptors to help with ExternalCompression. You can disable the application header with -A=.


Comment by semafuster, Jul 26, 2007

All I want to do if create a delta (diff) of two binary files.

How do I do that? If indeed xdelta can do this?

Comment by semafuster, Jul 26, 2007

All I want to do if create a delta (diff) of two binary files.

How do I do that? If indeed xdelta can do this?

Comment by semafuster, Jul 26, 2007

All I want to do if create a delta (diff) of two binary files.

How do I do that? If indeed xdelta can do this?

Comment by MrCricket, Aug 09, 2007

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

(From Batch file for xdelta1/xdelta3 compatibility)

Comment by jikku.joseph, Dec 03, 2007

I am using xdelta in windows. If a file is opened in microsoft word and while the file is still open I try to use xdelta to produce difference with another file, the following error happens. xdelta3: file open failed: read: <filename>: The process cannot access the fil e because it is being used by another process.

I suspect that this is because xdelta tries to open the file in non share mode. I found that if ms word is using a file and we try to open that file in a c# program in non shared mode the same error is thrown as above but if we open the the file in shared mode while in use by MS word,no error occurs.

Comment by psumm...@iinet.net.au, Dec 21, 2007

Yes, I too can confirm the problem that a xdelta file cannot be created if the source file is being shared with another application.

Comment by a...@intralan.co.uk, Dec 25, 2007

if you are using either Windows 2003 server or Windows 2008 server, you can use 'volume shadow copy' vssadmin create shadow /For=C:

then use dosdev.exe to map a drive to the shadow, you can then access the files without there being an issue with locks, this applies to any file that was located on that drive including sql databases and any other locked files.

if you are running .Net Framework v3.5 I have written a small utility to automate the creation and deletion of the shadows and map the drive, delete the drive. Email me directly at alex at intralan dot co dot uk and I will send a copy.

Comment by akaaseem, Aug 23, 2008

my friend and i r using this program but he gets better compression than me and is not tellin me how he is getting almost double the compression, i make the file 650mb from 1gb but he makes it 349mb, same source files r used the command m using is delta3.exe -e -9 -S djw -s source target patch what is the command line for maximum compression

Comment by dmpem...@yahoo.com, Sep 22, 2008

How can I get the python version to work?

Comment by dmpem...@yahoo.com, Sep 22, 2008

This is what I get when I run setup. I compiled it with Cygwin then with Visual Studio, both times I get the same msg when running setup. Any suggestions?

c:/xdelta3> python setup.py install --verbose --compile --force running install running build running build_ext error: Python was built with Visual Studio 2003; extensions must be built with a compiler than can generate compatible binaries. Visual Studio 2003 was not found on this system. If you have Cygwin installed, you can try compiling with MingW32?, by passing "-c mingw32" to setup.py.

Comment by garethhayter, Nov 06, 2008

What are the commands for the new merging/combining features?

Comment by noonand, Nov 20, 2008

Is there a way to get xdelta to take two folder path, recurse through them and do a delta for dir1 vs dir2?

Comment by jaakko.manninen, Dec 09, 2008

Thank you for xdelta! <3

Comment by va7srthomson, Mar 24, 2009

Clarify usage of -S [djw|fgk] enable/disable secondary compression please

Comment by julien.buty, Aug 15, 2009

What technique use Xdelta to delta encode? Bentley/McIlroy? technique?

Comment by jcas1411, Aug 25, 2009

Has anyone successfully created patches for bootable ISO's.. my hashes don't match and patched ISO will not burn.

Comment by jcas1411, Aug 25, 2009

sorry was using an unpatched version.. It's now working beautifully.

Comment by Cohen.Johnathan, Oct 12, 2009

I believe this page needs updating, recode merge djw1-9 etc...

Comment by jpeterson57, Nov 18 (4 days ago)

Is there some way to view the changes graphically like with SVN patch files and TortoiseUDiff.exe?


Sign in to add a comment
Hosted by Google Code