views:

367

answers:

2

Is there an open-source Java implementation of the VCDIFF binary diff format (decoder and encoder)?

There are xdelta and open-vcdiff, but those are both C libraries.

Alternatively, are the other formats/algorithms that one could use to generate diffs for binary files from Java?

+2  A: 

I have a decoder for VCDIFF written in C#, which would probably be fairly straightforward to port to Java, if that's any help. It's part of MiscUtil but I don't think it relies on any other bits of MiscUtil (or only minimally, anyway).

Unfortunately I never got round to writing an encoder, which is obviously rather harder - and wasn't necessary in our case (where we needed to apply patches in .NET on a mobile device, but could create them however we wanted at the server).

Jon Skeet
Actually, I am in a similar situation, so having just the decoder would probably work. I'll take a look at MiscUtil, thanks.
Thilo
A: 

There is a java-port of xdelta: http://sourceforge.net/projects/javaxdelta/

But i can not say anything on its quality - i did not try it yet.

I think it does not do VCDIFF, but GDIFF, which is an older standard (and MUCH simpler). It does have both decoder and encoder, though.
Thilo