pixel / hexedit

View and edit files in hexadecimal or in ASCII
http://rigaux.org/hexedit.html
GNU General Public License v2.0
98 stars 41 forks source link

Diff #9

Open 0xbad0c0d3 opened 8 years ago

0xbad0c0d3 commented 8 years ago

Just mark differences between two files...

eribertomota commented 7 years ago

Hi, there are conflicts. Maybe you need review the code. (I am not the project upstream and I can't commit anything)

pixel commented 7 years ago

Hi, I'm ok to mark cursor position in both modes. As for "diff two files", i find it a too advanced functionality for hexedit. But i may be wrong...

0xbad0c0d3 commented 6 years ago

pixel, hi! I had a case where it was necessary - it was only SSH access to the server and it's need to compare two binary files, with this option it was much easier, as for me and it's an option, may be some who will find it needed in feature, he will look to man (i hope he will!) and will be wondered that hexedit can help )) But it's only my opinion ))

prigaux commented 4 years ago

What about a diff between "hexdump -C" of the files.

0xbad0c0d3 commented 4 years ago

What about a diff between "hexdump -C" of the files.

What do you mean?

prigaux commented 4 years ago

For non big files, I usually use: diff -u <(hexdump -C file1) <(hexdump -C file2) or meld <(hexdump -C file1) <(hexdump -C file2)

The advantage of hexedit is working on devices or huge files. Is the diff you want on devices or huge files?

Francewhoa commented 3 years ago

Hello @0xbad0c0d3 @pixel & all :) For those interested in a Diff feature. Here are four suggestions below.

wxHexEditor

wxHexEditor is able to Diff very large file up to 2^64 bytes (2 ExaByte). Which is Godzilla-large, LOL (joke ;) Also it has a GUI. Cross-platform. And lots of features. wxHexEditor code is open source. Maybe some of its Diff code or logic could be recycled for hexedit?

wxHexEditor is my favorite for Diff with a GUI



Vbindiff

Vbindiff is also able to Diff large file up to 4GB. Which is like Baby-Godzilla-large, LOL (joke ;) Vbindiff code is also open source. Maybe some of its Diff code or logic could be recycled for hexedit?


hexcompare

hexcompare is a Terminal/Console command. Which might be able to handle large file. I did a quick test with a 25GB file, and it was successful. The risk with hexcompare is that it does not claim to be able to handle Diff with large files.

hexcompare has this very nice and easy to understand visual display of the Diff result in Terminal. See screenshot below. Not a GUI. But a very easy to use Terminal command. hexcompare code is also open source. Maybe some of its Diff code or logic could be recycled for hexedit?

1

hexcompare is my favorite for Diff within a Terminal

Meld

Meld has a GUI. Very easy to use. But only for Diff with small files. By small I mean within your device RAM limit. Because Meld seems to try to store the whole files into memory during the Diff. Which is risky to not be sustainable for very large files. For example, with Meld if you try to do a diff on two 200GB file, you would need more than 400GB of RAM. Most end-user don’t have that much resource. In comparison, wxHexEditor, Vbindiff, hexcompare use a very small amount of RAM. Less than a few MB. As they Diff one chunk of the file at a time. Not all at once.

As you know Meld code is also open source. Maybe some of its Diff code or logic could be recycled for hexedit?

About Me

I'm not a software engineer. Any volunteer interested to contribute a patch for adding Diff to hexedit? I would be happy to contribute testing and documentation if needed.