5

I have in my hands a handful of cases from different scenarios where I copied some data to my PC through a transmission path with no built-in error detection or correction. I have or can make more copies of them. The problem is, not twice do the files turn out identical. There's always a few scattered differences, frequently 1-bit differences.

My idea here is to attempt to correct these errors "democratically" by comparing all copies of the same data together and, at those offsets where one copy disagrees, keep the value shared by most, ignoring the value that is in minority.

Given that the transmission errors seem to be random and never in the same spot, I think the concept is valid and could work.

The question is: Is there any software that can do this? Even if it requires manual inspection it's fine. I tried several hex editors, but I couldn't find one that allowed to find differences among 3 or more files. All of them seemed to be limited to comparing just 2 files, which, of course, doesn't help finding out which one is wrong.

I prefer open source software, but I'm not opposed to commercial software if it can't be avoided. My main OS is Windows 7 but I don't mind to be given a Linux or BSD based recommendation if no Windows alternative exists.

This is mostly a one-off task, so I don't mind an inconvenient convoluted manual process as long as it works.

  • 1
    You should be able to accomplish this with a few lines of Python. – Andrea Lazzarotto Mar 30 '17 at 20:44
  • Well, learning to program, in Python or whatever, is a bit farfetched for me for the time being. Hopefuly there's something else, pre-built, that can be kludged toghether to achieve this. – radorn Apr 2 '17 at 19:17
  • 1
    You should also be able to do this with Vim. Start with vimtutorial if you need an intro to vim. Then learn how to use vimdiff and how to use vim as a hex editor. Then you can compare & fix your files. – Tanath Apr 3 '17 at 18:33
  • OK, I guess I'll have to give Vim a try. – radorn Apr 3 '17 at 23:41
  • 1
    The time taken to learn vim would probably best spent in getting a BSc in computer science. :P Just kidding, but really, life is too short to learn vim. :) – Andrea Lazzarotto Apr 4 '17 at 11:35
0

So, I don't have those files anymore, but I eventually found a software that would have done the job.

https://github.com/sdottaka/winmerge-v2 can do 3-way binary comparison.

You need to add filename masks that you want the program to identify as binary, or else they get editted as text instead.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.