Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diff #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Diff #9

wants to merge 3 commits into from

Conversation

0xbad0c0d3
Copy link
Contributor

Just mark differences between two files...

@eribertomota
Copy link
Contributor

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

@pixel
Copy link
Owner

pixel commented Sep 13, 2017

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
Copy link
Contributor Author

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 ))

@0xbad0c0d3 0xbad0c0d3 closed this Sep 25, 2017
@0xbad0c0d3 0xbad0c0d3 reopened this Sep 25, 2017
@prigaux
Copy link
Collaborator

prigaux commented Apr 1, 2020

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

@0xbad0c0d3
Copy link
Contributor Author

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

What do you mean?

@prigaux
Copy link
Collaborator

prigaux commented Apr 1, 2020

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?

@0xbad0c0d3 0xbad0c0d3 mentioned this pull request Aug 9, 2021
@Francewhoa
Copy link

Francewhoa commented Aug 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants