Tool for comparing 2 binary files in Windows [closed]
Asked Answered
I

6

208

I need a tool to compare 2 binaries. The files are quite large. Some freeware or trial tools I found on the Internet are not convenient to use for large files. Can you recommend me some tools?

Inchoate answered 17/11, 2011 at 11:56 Comment(0)
H
137

A few possibilities:

See also: https://web.archive.org/web/20151122151611/https://stackoverflow.com/questions/688504/binary-diff-tool-for-very-large-files

Husted answered 17/11, 2011 at 12:0 Comment(9)
I read in the notes of vBinDiff that "unlike diff, it works well with large files (up to 4 GB)." So its suitability for working with large files depends on your definition of "large". Also, I found it would mysteriously not start up under windows 7 x64.Colecolectomy
Bare in mind that VBinDiff is a CLI program, so if you just try to run it on Windows, it will either appear not to start, or will very briefly show a command prompt window, which quickly disappears. Open up a command prompt and run the program from there to see what arguments it accepts, and then use it from the command prompt accordingly.Redness
vBinDiff works fine for me in Windows 7 x64.Lambeth
When I tried using vBinDiff to compare two 1.4 GB files, it croaked. Neither can WinDiff handle such files.Globular
@Colecolectomy I too found this quite humorous, although I found that it does work with files larger than 4 GB -- you just can't see diffs past 4 GB. That was enough for my purposes, although it would be great to have true LFS.Nanettenani
Anyone know were we can get WinDiff from? The link is just to the wikipedia page. There's a link to XPsp2 support tools there (which includes it), but that will only install on XP.Particle
VBinDiff is AWESOME! Thought it is CLI, it is easy to use! Except maybe I had to search what RET key is xD It turns that it is the Enter key.Marigolde
vBinDiff doesn't seem to deal with inserted bytes at all, so it's really not much better than HxD except that it shows you all the changes in red.Textualist
VBinDiff allows you to freeze one of the two scroll areas and when you make them sync again by scrolling the other one byte at a time it shows the same parts in white and diffs in red. So it is more of a manual tool, but with visual aidPistil
C
258

If you want to find out only whether or not the files are identical, you can use the Windows fc command in binary mode:

fc.exe /b file1 file2

For details, see the reference for fc

Cummins answered 20/12, 2012 at 15:59 Comment(4)
for the same purpose - only whether files are identical or not - a portable app Duplicate File Finder works good enough. Particularly for big files like .iso files.Koblas
this should be the accepted answer, since this is windows native and not an addition 3rd party appAlcoholometer
this just shows a list of bytecodes - there is also a "comp" tool in the command-line, but that one seems to require files to be of same sizePistil
This is exactly what I was lookig for, thanks a lot! This shows a table of the addresses which the changes and shows what changed.Ierna
H
137

A few possibilities:

See also: https://web.archive.org/web/20151122151611/https://stackoverflow.com/questions/688504/binary-diff-tool-for-very-large-files

Husted answered 17/11, 2011 at 12:0 Comment(9)
I read in the notes of vBinDiff that "unlike diff, it works well with large files (up to 4 GB)." So its suitability for working with large files depends on your definition of "large". Also, I found it would mysteriously not start up under windows 7 x64.Colecolectomy
Bare in mind that VBinDiff is a CLI program, so if you just try to run it on Windows, it will either appear not to start, or will very briefly show a command prompt window, which quickly disappears. Open up a command prompt and run the program from there to see what arguments it accepts, and then use it from the command prompt accordingly.Redness
vBinDiff works fine for me in Windows 7 x64.Lambeth
When I tried using vBinDiff to compare two 1.4 GB files, it croaked. Neither can WinDiff handle such files.Globular
@Colecolectomy I too found this quite humorous, although I found that it does work with files larger than 4 GB -- you just can't see diffs past 4 GB. That was enough for my purposes, although it would be great to have true LFS.Nanettenani
Anyone know were we can get WinDiff from? The link is just to the wikipedia page. There's a link to XPsp2 support tools there (which includes it), but that will only install on XP.Particle
VBinDiff is AWESOME! Thought it is CLI, it is easy to use! Except maybe I had to search what RET key is xD It turns that it is the Enter key.Marigolde
vBinDiff doesn't seem to deal with inserted bytes at all, so it's really not much better than HxD except that it shows you all the changes in red.Textualist
VBinDiff allows you to freeze one of the two scroll areas and when you make them sync again by scrolling the other one byte at a time it shows the same parts in white and diffs in red. So it is more of a manual tool, but with visual aidPistil
R
27

Total Commander also has a binary compare option: go to: File \\Compare by content

ps. I guess some people may alredy be using this tool and may not be aware of the built-in feature.

Rusty answered 9/9, 2013 at 16:39 Comment(2)
This doesn't understand inserted content like a text diff tool, though, only changes to bytes.Textualist
@Textualist and another thing to mention is that Total Commander costs $42 USD.Cranny
F
20

My favorite "swiss knife" is Beyond Compare from http://www.scootersoftware.com/

Foot answered 21/2, 2014 at 22:6 Comment(6)
Beyond Compare doesn't work for binary files above 500MB...Liegnitz
Try this one github.com/Shelwien/cmpFoot
@BorisIvanov: It probably helps to mention that Beyond Compare is a paid software that will work only for 30 days. After that you'll have to get the license that costs $60.Cranny
strange things but version I have downloaded from official site always working even after trial period. no hacks.Foot
Beyond Compare doesn't appear to have binary diffing capability, which is what the question was about.Architect
Check Shelwien toolFoot
F
16

I prefer to use objcopy to convert to hex, then use diff.

Friary answered 18/9, 2013 at 15:21 Comment(1)
Useful answer. The output file size is about 3 times as big as the input file. This command will convert a binary file to hex. objcopy -I binary -O ihex <in_file> <out_file>Ludie
A
13

In Cygwin:

$cmp -bl <file1> <file2>

diffs binary offsets and values are in decimal and octal respectively.. Vladi.

Anallese answered 10/1, 2014 at 7:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.