I'm looking for a way to quantify the changes made to a file. That is, if I have a file with something written on, and I edit it and save it, is there a way to know (using Python or C/C++) how much the files has changed?
For example, if my file is "aaaaaaaaaaa" and I change it to "aaabbbbbbb", that quantification method should yield a greater result (assuming thats quantifiable) than if I had changed it to "aaaaaaaaaba".
Hope I made myself clear,
Thanks in advance
Edit:
It is supposed to be done without actually reading the file.
On a lines you could use diff.
To Edit: xor_hash(new) - xor_hash(old)
Quantify file changes