Octodiff
Octodiff copied to clipboard
Reverse Diff?
Could we undo a file with octodiff that has been previously created if we have the diff files?
Hi @finepointcgi ! We use Octodiff by:
- Creating a signature of file1.
- Creating a delta file using the signature file and file2.
- Patching the file1 and the delta file to re-create file2.
Does that help?
Hi @finepointcgi
If I understand correctly, is this what you're asking?
- Start with OLDFILE
- Create a signature and then delta between OLDFILE and NEWFILE
- OLDFILE becomes lost or corrupt
- Given NEWFILE and the delta between OLDFILE and NEWFILE, can we recover OLDFILE?
The answer is, no, OLDFILE cannot be recovered here. The delta file contains information about what is different in NEWFILE, for example:
OLDFILE = "aaa123bbb" NEWFILE = "aaa999bbb"
The delta file will contain instructions as follows:
- bytes 1-3 are unchanged
- bytes 4-6 are "999"
- bytes 7-9 are unchanged
Nowhere is there a record that in oldfile, bytes 4-6 were "123", that information cannot be recovered