340 B
340 B
Toy LCS-based Diff program
Toy Longest-Common-Subsequence based diff and patch program, minimizing the edit script's sum of line-addition and line-deletions.
Example usage:
python diff.py a1 b1 > patch1
python patch.py a1 patch1 > c1 # patch is not in-place
python diff.py a1 c1 # verify that a1 and c1 has the same content