My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
CommandLineSyntax  
Command-line flags and usage.
Featured
Updated Feb 4, 2010 by josh.mac...@gmail.com

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 semafus...@gmail.com, 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 semafus...@gmail.com, 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 semafus...@gmail.com, 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 MrCric...@gmail.com, Aug 9, 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.jo...@gmail.com, Dec 3, 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 akaas...@gmail.com, 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 garethha...@gmail.com, Nov 6, 2008

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

Comment by noon...@gmail.com, 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.m...@gmail.com, Dec 9, 2008

Thank you for xdelta! <3

Comment by va7srtho...@gmail.com, Mar 24, 2009

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

Comment by julien.b...@gmail.com, Aug 15, 2009

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

Comment by jcas1...@gmail.com, 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 jcas1...@gmail.com, Aug 25, 2009

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

Comment by Cohen.Jo...@gmail.com, Oct 12, 2009

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

Comment by jpeterson57@gmail.com, Nov 18, 2009

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

Comment by star.pa...@gmail.com, Feb 8, 2010

Is there any way to know output file length when applying a patch?

Comment by netv...@gmail.com, Aug 17, 2010

Is there anyway to apply the patch without overwriting? Another words, make the necessary changes in the current file... Examples: software update or bad file copy (its a pain in the ass to copy the whole file again if it's 2gbs+)

Comment by hovsep....@gmail.com, Oct 6, 2010

hi guys i want to compare two binary files together...how can i do it using xdelta3 in windows...thank you

Comment by networki...@gmail.com, Oct 31, 2010

I see a ton of warnings when building 3.0z on ubuntu 9.10...

Comment by h.yuz...@gmail.com, Feb 22, 2011

It's true. xdelta3 generates the much smaller delta-files than other tools. I have integrated it into our software. thanks.

Comment by alz...@gmail.com, Aug 23, 2011

How can I see the diff it self , I'm not interested in the new file, what I want to see is the acutual difference between the new file and the old one.

Comment by schmid...@gmail.com, Sep 1, 2011

It would be very nice if xdelta supported multiple files patching. Something like:

xdelta3 -r /path/folder1 /path/folder2 >allfilesrecursivepatch.xdelta

For recursive comparing all files on folder1 and folder2 and creating a single patch-file for all of them. And:

xdelta3 -r -d /path/folder1 <allfilesrecursivepatch.xdelta

For applying the patch on all files contained on folder1

Comment by thevoodo...@gmail.com, Oct 1, 2011

1st its better to make it using regular expressions such as .ext or . to process all files 2nd this can be done with for loops

look at example of my bat script:

set n=0 set "VER=DIF" for %%A in (%DIR1%\.!VER!) do (
@set /a n=!n!+1 @title Patching !N!? @cls @echo Please wait... call %XD% %ARG% "%DIR1%\%%~nA" "%DIR1%\%%~nxA" "%DIR1%\%%~nA.NEW" @del /q /f "%DIR1%\%%~nxA" if exist "%DIR1%\%%~nA.NEW" ( @del /q /f "%DIR1%\%%~nA" @ren "%DIR1%\%%~nA.NEW" "%%~nA" )
)

Comment by samuel.n...@gmail.com, Oct 23, 2011

Xdelta return some error code if the patch is not made with success ?


Sign in to add a comment
Powered by Google Project Hosting