How to compare two HEX dumps?

I have two hex dumps that in theory should be the same.

I did an MD5 check and the hashes were different. But I suspect that simply one of the dumps is offset relative to the other.

Is there any tool for Windows that can compare two dumps and account for any offsetting?

Are these actual binary hexadecimal data (i.e. not written as characters 0-9 and A-F)? It might not be exactly what you’re looking for, but I use HexEdit to look at binary data. In my case, that data is a mix of integer and floating point data (saved as binary data, not ASCII). I don’t know that it would compare two files, but you can use it to search for the same string of data in each file. It also lets you edit the files, so you could cut out the extra data in the one file, save it with a different name, then you could compare using that file.

Even if it’s not the best tool for this particular problem, if you’re looking at hexadecimal data, it would be worth (free to use!) having.

What you want is a diff viewer. A quick search found vbindiff, which is GPL’d and has a Win version.

If the data is just offset, diff will very likely find that quickly (though I don’t think it’s guaranteed to, for any given offset).

FrHEd (Free Hex Editor) will compare two HEX files.

This one did the trick! Thanks

Just for future reference, the standard DOS utility program FC (File Compare) has an option ( /B I think) to compare binary files. If the files are mostly the same, differing in just a few bytes somewhere, it will find that.

FC is what came to mind for me too, but Dog80 wants to ignore offsetting, which AFAIK FC won’t do. I think that all the /b option does is suppress showing the textual differences after execution. (It’ll only indicate whether the file differs or not, that’s all it will say).

If some 1-dimensional arrangement of binary data B contains some 1-dimentional arrangement of binary data A, an implementation of Boyer Moore should be able to find any and all occurrences of the data, and tell you exactly what offset it starts at. It’s not too hard to implement either.

I use BeyondCompare for that a lot. I don’t think it’s free or even cheap, but it’s an awesome, flexible tool.

Or you could use TextPad, dump it to a text file, and compare the text files using any number of tools. In a pinch, I’ve used a perl script to dump it to a text file and used pencil and paper to do it by hand.