OctopusDeploy / Octodiff

| Public | 100% C# implementation of remote delta compression based on the rsync algorithm
Other
24 stars 87 forks source link

Reverse Diff? #26

Closed finepointcgi closed 1 year ago

finepointcgi commented 3 years ago

Could we undo a file with octodiff that has been previously created if we have the diff files?

akirayamamoto commented 1 year ago

Hi @finepointcgi ! We use Octodiff by:

  1. Creating a signature of file1.
  2. Creating a delta file using the signature file and file2.
  3. Patching the file1 and the delta file to re-create file2.

Does that help?

borland commented 1 year ago

Hi @finepointcgi

If I understand correctly, is this what you're asking?

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:

Nowhere is there a record that in oldfile, bytes 4-6 were "123", that information cannot be recovered