I have a set of binary configuration files with three versions each -- an original, and two differently-modified versions of each file. I need to be able to see the differences between the two versions as well as the original, all at the same time.
What I need is a three-way diff tool for binary files. Through a rather exhausting Google search, I eventually happened upon a screenshot of an application that does exactly what I need -- unfortunately, the forum post containing the image does not mention what application it is they're using:
http://www.xboxhacker.org/index.php?topic=15032.0
Can someone point me in the direction of a (Windows) application that provides a binary-safe (hex) comparison of three binary files??
The latest version of Beyond Compare seems to support 3-way diff and merge. Moreover, its feature list says it supports comparison of binary files.
Note that this is not free software :-)
I was recently introduced to p4merge, which appears to also support binary files.
It takes 3 files as input: The original and two derivatives. It shows them side-by-side, with a fourth window that shows the merged file, with editing capabilities and conflict resolution.
I just used this to merge two branches of a large codebase, and it was extremely convenient.
Now, I haven't used it to merge binary files, but it does support diffing pictures, so I'd be surprised if binaries weren't supported.
Vim has a built-in diff tool that can compare an arbitrary number of files. It also runs on Windows. You can find it at http://vim.org.
The standard installation of vim for windows includes
xxd
, which allows you to see binary files as text:So for example if you try:
you'll get:
etc...
So you can use
xxd
to dump your binary files into text files:And then run vim in diff mode:
And this will give you something like this:
(This screenshot was taken from here and is no more than an illustration of what a 3-way diff will look like in VIM)
All of these tools are available in windows, so they should solve your problem.
Edit:
After you merge the results of
xxd
, you can convert the hex dump into a binary file usingxxd -r
:You can see more details and options in
xxd
's manpageYou could have a look to ECMerge (a tool I work on), it has a 2 and 3-way diff of binary files (HEX + ASCII). There is no merge feature. You can move from changed area to change area easily and compact long zones (long insertions, changes or unchanged).
The screenshot is from Araxis Merge. Their pro edition ($270) supports 3-way compares.