Do you know Unix/Linux diff(1) tool works? It shows which lines were added and removed between 2 text files, and shows it in the human-readable form. I need the same kind of tool for binary files - except for working on sequences of bytes, not text lines. It still must produce human-readable output (in hex thus).

Note that I don't need cmp -l which diffs binary files byte by byte and can't detect insertions and removals. Note that I don't need xdelta or bsdiff which produce non-human-readable output. Actually, I'm a bit astonished that neither xdelta nor bsdiff offer some kind of human-readable representation for patches they produce. IMHO, such option should be there first, and only then an option to produce an efficient binary patch. After all, how the authors of those tools verify them to work right? And don't they think users will want to verify them either, to make sure that they indeed produce sane and minimal patches?

(Sorry for the rant ;-))

link|improve this question
Why not convert the two files into hex and then diff the hexed versions? – Amazed Jan 12 at 18:51
If you convert to just hex values, w/o offset, then resulting diff won't convey strict information - it could be used as heuristical measure of how files are different, not to analyze differences, or be used as a patch. If convert with offset information, you immediately get spurious diffs on first insertion/deletion. So, it must be a smarter, special-purpose tool, not a quick hack. And existing tool ("how to write such tool?" I would post on StackOverflow). – pfalcon Jan 12 at 19:20
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.