This function takes a source string
src, and a destination
dest. It returns a patch object that can be later used
ide.patch to reconstruct the destination string.
size parameter determines the minimum length of a single
patch string, the algorithm will optimize the result based on this number.
A patch object consists of an array of triplets, where the first item is the string to be inserted, the second, the characters to be skipped from the original string and the third the characters removed after inserting.
This function takes the original source string
str and the
result of a previous diff
patch. The result will be the
Source code is hosted in github as a gist.