Last Edited: 01 May 2008 by superuser
Importered from old WiKi -- 30/04-08 18:04.

Xdelta

Xdelta is a tool to compare different files; in addition it can create a delta file that contains just the differences between the files, and use a delta file to patch one file to turn it into another.

For example:

  • Barry creates Puppy 99 and releases it as puppy-99.iso which is 100MB in size.
  • Annie downloads puppy-99.iso and burns it and begins her Puppy happiness.
  • Barry fixes some minor bugs in Puppy 99 and releases puppy-99.01.iso, again 100MB in size.
  • Barry also releases an xdelta patch that can turn puppy-99.iso into puppy-99.01.iso; the patch is called puppy-99_99.01.delta and is only 3MB in size.
  • Annie downloads puppy-99_99.01.delta (3MB), puts it in the same folder as puppy-99.iso, runs xdelta and her result is a brand new puppy-99.01.iso file, alongside her original ISO file.

Annie got her new, updated Puppy by downloading just a 3MB xdelta patch, instead of another 100 MB iso.

Download

  • Xdelta.pet∞ to install xdelta on your Puppy system. (xdelta is also available for Windows and other operating systems.)

Instructions

To create a delta file with the differences between 2 ISO files

e.g. you are a developer/Puplet-creator who wants to create a patch

  • first put both files in the same folder
  • open a terminal/console (click on the Console icon on the desktop or go to Menu > Utility > rxvt terminal emulator)
  • type the following code into the console, adjusting the file names to match the names of the files you have/want,

    xdelta3 -e -s oldfile newfile oldisofiletonewisofile.delta

    and press enter. That's it; just wait 1 or 2 minutes and the delta file will be created in the folder.

    So for our fictional upgrade by Barry for Annie, Barry would type:

    xdelta3 -e -s puppy-99.iso puppy-99.01.iso puppy-99_99.01.delta

    To upgrade an old ISO file with a delta file to make the new ISO file

    e.g. you are an end-user who downloaded a patch and wants to update an ISO file

    • first put both files in the same folder
    • open a terminal/console (click on the Console icon on the desktop or go to Menu > Utility > rxvt terminal emulator)
    • type the following code into the console, adjusting the file names to match the names of the files you have/want,

      xdelta3 -d -s oldfile oldfiletonewfile.delta newfile

      and press enter. That's it; just wait 10~15 seconds and the new iso will be created in the folder. Your original ISO is still available and unaffected.

    So for our fictional upgrade from Barry, Annie would type:

    xdelta3 -d -s puppy-99.iso puppy-99_99.01.delta puppy-99.01.iso