A compactly represented difference between an original document and a revision.
|
A Patch contains just the information necessary to transform one side of a Algorithm.Diff.Diff into the other side. It contains a list of the regions in the documents in which there are differences, and in the cases of changes and insertions it contains the changed and inserted data from the revision. It contains no data from the original document.
A Patch object may or may not be initialized with document data. When it is created by a Diff object, is has a reference to the original and revision documents. When it is deserialized from storage, it does not have document data. (It only has the changed data from the revised document.) Only when it has document data is it possible to output the entire revised document.