clone of http://code.google.com/p/google-diff-match-patch/