Comparison improvement: Synchronized scrolling and difference highlighting

Wishlists for new functionality and features.
Post Reply
rainwarrior
Posts: 3
Joined: 28 Jul 2018 19:01

Comparison improvement: Synchronized scrolling and difference highlighting

Post by rainwarrior » 28 Jul 2018 19:17

Have been trying out HxD recently, and I think it's a really fantastic hex editor.

However, the comparison feature does not seem useful at all in its current form. Binary comparison is a task I do frequently and it would be great to have it integrated with a hex editor like this. I think it's very close to being extremely useful though, with only the following addition:

1. When using comparison, highlight all differing bytes in view with some colour change.

2. Skipping to next/previous should go to the next contiguous group of changed bytes, not the next byte.

Without 1 this really can't be used to quickly visually inspect differences, and without 2 scanning for the next group of differences one takes too many presses of F6 to ever get there (imagine a 1000 byte string of changed data).

I usually use a tool called VBinDiff for that task but having a comparison feature like this in a good windowed hex editor like this would be a much better replacement.


Edit: Realized F6 does the recentering for both compared files, but really when comparing groups you need to be able to move around in lock step to look, so there's maybe a little more to it:

3. scrolling or using the cursor keys should scroll both panes at the same time (and probably a coloured highlight of the currently selected byte in both panels so you can see where you are).

Maël
Site Admin
Posts: 881
Joined: 12 Mar 2005 14:15

Re: Comparison improvement

Post by Maël » 30 Jul 2018 02:23

So your feature request can be summarized to:
  • Highlight differing bytes
  • Synchronized scrolling of both windows
    • scrolling or using the cursor keys should scroll both windows at the same time

rainwarrior
Posts: 3
Joined: 28 Jul 2018 19:01

Re: Comparison improvement: Synchronized scrolling and difference highlighting

Post by rainwarrior » 30 Jul 2018 06:58

Yes, though there was one more: ability to advance to the next group of different bytes rather than the next byte.

Maël
Site Admin
Posts: 881
Joined: 12 Mar 2005 14:15

Re: Comparison improvement: Synchronized scrolling and difference highlighting

Post by Maël » 30 Jul 2018 18:30

The next group of bytes means what exactly? The next difference (= inserted, deleted or changed blocks)?

I haven't seen that VBinDiff does it, but there are other tools that support resynchronizing compares. That's a lot more complex than byte wise compare, though. (NP complete problem, so you need heuristics.)

rainwarrior
Posts: 3
Joined: 28 Jul 2018 19:01

Re: Comparison improvement: Synchronized scrolling and difference highlighting

Post by rainwarrior » 30 Jul 2018 19:22

Contiguous groups. If there are 100 different bytes in a row that are different, that's one group. I don't want to hit F6 100 times in a row and then finally on the 100th time have it jump across the file to the next difference, I want to get to that next difference in one step.

Yes, there's a lot of complicated stuff that diff/merge tools can do, but I was making this request because it seemed like it could have a lot more utility with hopefully relatively small feature additions.


Actually I notice that in its current form, it can be used to compare things that don't start at the same file offset, i.e. you can set the current cursor position at two different locations in the different files before pressing F6. That's maybe a useful thing, being able to manually set the starting point for the comparison. Kind of at odds with the other requested thing, i.e. synchronized scrolling. You'd have to be able to turn it off for that. ...anyway that's just an aside. Obviously there's a huge rabbit hole of diff tool stuff, I wasn't trying to request that HxD become the perfect diff tool. In my own use the side by side comparison aligned to the beginning of the file is by far the most important case, but probably everyone has different needs.

Maël
Site Admin
Posts: 881
Joined: 12 Mar 2005 14:15

Re: Comparison improvement: Synchronized scrolling and difference highlighting

Post by Maël » 31 Jul 2018 00:43

Ok, so once a byte pair that is different is found, skip over all the differences that follow immediately. If there is a new contiguous block of differences, jump to it.

In this case, you would really need to have colored/highlighted blocks to understand what you are doing/goes on, and maybe some additional info in the status bar, such as the sizes/positions of the differing blocks.

That would mean looking ahead further down the file.

Post Reply