[go: up one dir, main page]

Menu

#73 hex view

open
nobody
None
5
2014-09-11
2008-01-08
No

A hex view would be very useful for comparing binary files.
Maybe the KHexEdit kpart could be used for this.

Discussion

  • Joachim Eibl

    Joachim Eibl - 2008-01-29

    Logged In: YES
    user_id=584435
    Originator: NO

    I investigated this topic already a while ago and concluded that this is lots of work and complicated too. But in case the files aren't too big, you could use a preprocessor like "od".
    od -A n --width=1 -v -t x1
    (See KDiff3->Config->Diff-Settings->Preprocessor)

    There is a windows version of "od.exe" too in the package of
    http://unxutils.sourceforge.net/.
    In Linux this is a standard tool.

    This example shows how with od every byte is converted to hex and placed in an
    individual line:
    echo ABCDE | od -A n --width=1 -v -t x1
    41
    42
    43
    44
    45
    0a

    For files that aren't too big, this should work fine. The line number would
    serve as address (but starting at 1).
    Disabling the diff option "Try hard (slower)" is recommended for bigger files.

    Regards,
    Joachim

     
  • Fathi Boudra

    Fathi Boudra - 2008-03-05

    Logged In: YES
    user_id=1122924
    Originator: NO

    I've got exactly the same idea.

    You could take a look to vbindiff which is a nice command line tools to compare binary files. It contains the feature I would like to see in kdiff3.
    As suggested, you can share khexedit/okteta source code.

    The main problem I can see is how to detect binary file or text file.

     
  • Fathi Boudra

    Fathi Boudra - 2008-04-15

    Logged In: YES
    user_id=1122924
    Originator: NO

    I tried od preprocessor and it isn't usable for big files (16Mb).
    For the record, I found a tool with the requested feature:
    http://www.scootersoftware.com/download.php?c=hexview

    It is implemented as an hexadecimal viewer plugin.

     
  • ELI

    ELI - 2011-04-16

    KDiff3 is a truly great piece, but unfortunately it is useless for binary files. There are a lot of free HEX editors out there, but really none that would compare to KDiff3, IF it was only possible to support HEX. The closest is the already mentioned VBinDiff. (The link from fboudra is Spam, trying to sell software!)

    @joachim:
    a) The "od" trick you mentioned below simply doesn't work!
    b) In addition, it would probably be a piece of cake (for you) to replace all characters in the input files with their associated HEX values. In fact THIS functionality should be simpler to implement, than that which you have already done!
    c) You probably need to add the documented but not implemented "disable carriage returns/linefeeds" to fix the column width.

     
  • Peng Wang

    Peng Wang - 2014-09-11

    So, any conclusion, progress, or plan on this? I occasionally wish a better support of binary comparison and merge.

    By the way, od is not natively available for Windows users.

     

    Last edit: Peng Wang 2014-09-12