Any working binary differ tool implements GDIFF(Generic Diff Format, NOT Graphical file difference)?

StackOverflow https://stackoverflow.com/questions/9545891

  •  04-12-2019
  •  | 
  •  

Question

I've seen GDIFF(Generic Diff Format) in wikipedia, and I wander is there any command line tool implements this standard. Now the best I have is LibXDiff, but it's a library, I'll need some extra work to make it run.

I know when it comes to binary-differ, VCDIFF(xdelta, etc) and bsdiff would have better compression rate, but in my case I really need a straight forward one. VCDIFF copies anything before current window(if my poor English reading was right about this article), and bsdiff's patch file format would be more complex.

update

Finally I found VCDIFF with xdelta3 is actually good and working, when "disable small string-matching" and "disable external decompression" is toggled, AND it has a pretty good "printdelta" command that prints very useful(for my app) information so that I don't really neet to extract VCDIFF format from the patch file.

Was it helpful?

Solution

Javaxdelta library implements xdelta and GDIFF patches. It can be used as command-line application like this:

# create patch
java -cp javaxdelta-2.0.1.jar:trove-1.0.2.jar com.nothome.delta.Delta source.file target.file patch.gdiff
# apply patch
java -cp javaxdelta-2.0.1.jar:trove-1.0.2.jar com.nothome.delta.GDiffPatcher unpatched.file patch.gdiff patched.file

I wrote once a wrapper around it to support directories patching (GDIFF files for directory are packed into one ZIP patch).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top