[rb-general] Comparing binary files

Gerardo Ballabio gerardo.ballabio at gmail.com
Mon Nov 19 11:42:57 CET 2018

That seems roughly equivalent to my solution, except that I would be
putting 4 bytes on each line instead of 1 (repeating each byte on 4
consecutive lines, i.e., if the sequence is ABCDEF... the lines would
be ABCD, BCDE, CDEF etc.).


Il giorno dom 18 nov 2018 alle ore 19:09 David A. Wheeler
<dwheeler at dwheeler.com> ha scritto:
> On November 18, 2018 12:29:39 PM EST, Gerardo Ballabio <gerardo.ballabio at gmail.com> wrote:
> >Richard Parkins wrote:
> >> Most binary file comparators just compare bytes, which doesn't detect
> >deletions or insertions.
> My personal workaround is to generate 1 byte in hexadecimal on each line, and then use regular diff -u.  Diff is quite good at detecting insertions and deletions. This approach is a total failure if there are internal pointers, since slight differences in length can produce a vast number of differences. But in some cases it works well enough, and it is super simple to do.
> --- David A.Wheeler

More information about the rb-general mailing list