#17 Compare (diff) binary files

closed-fixed
Jochen Tucht
3
2008-04-02
2001-08-10
Anonymous
No

Can not make a binaries diff on files. I tried on zip
files and CHM files.

Discussion

  • Dennis Lim
    Dennis Lim
    2001-10-08

    • labels: 104278 -->
    • milestone: 102450 -->
     
  • Dennis Lim
    Dennis Lim
    2001-10-08

    Logged In: YES
    user_id=117202

    Binary files currently cannot be diffed/merged. However, if
    you do a directory diff, you should be able to see if the
    binary files are different or identical. I'll move this
    item to a feature request.

     
  • Perry
    Perry
    2003-02-26

    Logged In: YES
    user_id=60964

    It is not obvious how to calculate & display diffs on binary
    files.

    The text diff'ing is entirely record (line) oriented, but
    there is no obvious a priori record structure to a binary file.

    I've tried modifying WinMerge to diff two binary files by
    converting them to hex dumps and diff'ing those, using
    fixed length records as lines, but the problem with this is
    that if you add a single byte to one side, then every line
    is different. So I gave up until I hear of (or think of)
    some solution for how to find record structure.

     
  • Kimmo Varis
    Kimmo Varis
    2003-03-26

    Logged In: YES
    user_id=631874

    Our current diff engine cannot handle binaries for reasons
    already mentioned.

    And I think that "line comparing" is not good solution at
    all for comparing binaries.

    Maybe our engine can be used to "rough" diffing still. We
    could divide binary data to (fixed size?) blocks and find
    blocks that are different. Then data inside different
    blocks is compared by memcmp() and friends. Different bytes
    are marked, not different lines. If user changed data
    inside block, we memcmp() block, and again mark different
    bytes...

     
  • Kimmo Varis
    Kimmo Varis
    2003-08-14

    Logged In: YES
    user_id=631874

    This is interesting: http://trific.ath.cx/software/binpatch/
    Open source binary diffing and patching tool.

     
  • Perry
    Perry
    2003-10-03

    Logged In: YES
    user_id=60964

    cppdumpctrl.asp looks very pretty :)

    We could do an external program (MergeBinary.exe %1 %2),
    which would give us complete separation. But, the merger for
    text files is built-in, so, why not build in the merger for
    binary files.

     
  • Perry
    Perry
    2003-11-25

    Logged In: YES
    user_id=60964

    This is obsolete, at least with its present title.

     
  • Kimmo Varis
    Kimmo Varis
    2003-11-26

    • summary: Can not diff binary files --> Diff binary files
    • labels: --> DIFF Engine
     
  • Kimmo Varis
    Kimmo Varis
    2003-11-26

    Logged In: YES
    user_id=631874

    I think ability to diff binary files is sensible RFE.
    Updading summary.

     
  • Perry
    Perry
    2003-11-26

    Logged In: YES
    user_id=60964

    I concur (diff binary files is a reasonable RFE).

     
  • Kimmo Varis
    Kimmo Varis
    2003-12-08

    Logged In: YES
    user_id=631874

    Lowering priority and setting resolution to 'Later' - not
    for next stable version.

     
  • Kimmo Varis
    Kimmo Varis
    2003-12-08

    • priority: 5 --> 3
    • status: open --> open-later
     
  • Kimmo Varis
    Kimmo Varis
    2004-06-10

    • summary: Diff binary files --> Compare (diff) binary files
     
  • Kimmo Varis
    Kimmo Varis
    2004-06-10

    Logged In: YES
    user_id=631874

    Again tweaking summary to make this easier to find (and
    avoid dublicates). --> Compare (diff) binary files.

     
  • ganier
    ganier
    2004-06-14

    Logged In: YES
    user_id=804270

    See patch [ 972299 ] Unpacker for comparing binary files
    A simple compare, a la windiff.

    Proposed in RFE #969686.

    Not as pretty or powerful as an hex dump, but see Perry's
    argument against hex dump below.

     
  • Defenestration
    Defenestration
    2005-05-23

    Logged In: YES
    user_id=1116538

    I would like a very basic byte comparison diff engine to be
    implemented in WinMerge. It will just go through the two
    files highlighting any bytes that are different. This is
    often the kind of functionality I require. For example, if
    File_1 contains

    1234567890

    and File_2 contains

    12344567890

    then the first 4 bytes of the files will not be highlighted,
    but the remainder of the bytes will be highlighted.

    This kind of functionality would be very easy to implement
    and would be a perfect stop-gap until a more intelligent
    binary diff engine can be found. As it stands, I (and I'm
    sure other people) have to use two different diffing tools
    (WinMerge for text and HexCmp for binary)

    As already mentioned, the cppdumpctrl could be used to
    display the data/changes.

    I haven't yet checked whether the BinPatch/BinDiff apps
    offer a more intelligent binary diff engine, but will do so
    and report back here.

    Please can you add the simple byte compariswon ASAP though
    since WinMerge is seriously lacking without this basic
    binary comparison.

     
  • Defenestration
    Defenestration
    2005-05-24

    Logged In: YES
    user_id=1116538

    I checked the BinDiff utility and it can only work on files
    of the same size.

    It also does the comparison using blocks of code.

     
  • Logged In: NO

    I checked the BinDiff utility and it can only work on files
    of the same size.

    It also does the comparison using blocks of code.

     
  • Defenestration
    Defenestration
    2005-06-10

    Logged In: YES
    user_id=1116538

    I've just found a diff utility that can do intelligent
    comparison/diff of binary files (ExamDiff Pro -
    http://www.prestosoft.com/ps.asp?page=edp_examdiffpro\)

    It uses Eugene Myers' diff algorithm
    (http://www.prestosoft.com/ps.asp?page=edp_faq#5) which has
    been documented.

    As can be seen from the screenshot, it really is a proper
    diff of binary files

    http://www.prestosoft.com/images/edpro_srceen_bin.jpg

    With this information, can you add support for binary
    compare/diff to WinMerge.

    I would still like there to be two options for binary diff:

    1) Basic byte compare, highlighting the differences
    2) Clever binary compare based on Eugene Myer's algorithm.

    It should be possible to set which type of diff you want
    from the options dialog.

     
  • Kimmo Varis
    Kimmo Varis
    2006-06-15

    Logged In: YES
    user_id=631874

    Yes, there are some tools visually comparing binary files.

    I'm starting to disagree with this whole RFE. There are
    other tools, WinMerge doesn't really need this binary file
    compare. Rather we should allow easier use of those external
    tools.

    It doesn't make sense to duplicate lots of code for slightly
    different view/compare. Somebody must also maintain that
    code. And we already have way too much code nobody really
    cares about.

     
  • MrChris
    MrChris
    2006-07-31

    Logged In: YES
    user_id=1565616

    I still think this would be a great feature to have in
    WinMerge. Heck, I'd just like to see a stand-alone open
    source/freeware utility that could do this. But to date, I
    have not found any utilities like ExamDiff Pro that are free
    or open source. Are there really any freeware/open source
    visual binary diff tools out there that fill this void?

     
  • Miro Halas
    Miro Halas
    2007-03-07

    Logged In: YES
    user_id=166079
    Originator: NO

    How about just displaying two views similar to how freeware Hex Editor XVI32 displays it files. Basically winmerge would display them as hex representation oand provide synchronized scrolling.

     
  • Kimmo Varis
    Kimmo Varis
    2008-04-02

    • assigned_to: nobody --> jtuc
    • status: open-later --> closed-fixed
     
  • Kimmo Varis
    Kimmo Varis
    2008-04-02

    Logged In: YES
    user_id=631874
    Originator: NO

    I'm closing this as fixed. WinMerge 2.8 can show differences in binary files.

    It shows binary files in text, mode not in hex-editor-like mode.