I am analyzing hex data from binary data dumps from a basic command-line program of mine. I'm basically dumping the exact contents of a struct (a large array of structs, actually) to a text file.
I then create a second binary dump, and compare the two files in vim
using xxd
to create binary-to-text representations of the original data.
Both files are the exact same size in bytes, and I'm trying to compare the two in a meaningful way. Even a small change in the data before I dump the file results in a large change in other parts of the file, due to other sections containing hashes, functions based on the value I changed, and so forth.
Is it possible to tell diff
or vimdiff
to say, compare two files, and show me only the parts of the file where in the original file (ie: file 1) a value was set to 1
, and in the second file, the value was set to 32
?
Thank you!
vim
. How does this address the problem of field-specific comparison given that I know that a single field will start at valuex
and in the second file will be valuey
? – Cosy