Increase the context until it is unique, but don't let the pattern expand beyond Match_MaxBits. @param patch The patch to grow. @param text Source text.
Add some padding on text start and end so that edges can match something. Intended to be called only from within patch_apply. @param patches Array of Patch objects. @return The padding string added to each side.
Parse a textual representation of patches and return a List of Patch objects. @param textline Text representation of patches. @return List of Patch objects. @throws ArgumentException If invalid input.
Compute a list of patches to turn text1 into text2. A set of diffs will be computed. @param text1 Old text. @param text2 New text. @return List of Patch objects.
Compute a list of patches to turn text1 into text2. text1 will be derived from the provided diffs. @param diffs Array of Diff objects for text1 to text2. @return List of Patch objects.
Compute a list of patches to turn text1 into text2. text2 is not provided, diffs are the delta between text1 and text2. @param text1 Old text. @param diffs Array of Diff objects for text1 to text2. @return List of Patch objects.
Take a list of patches and return a textual representation. @param patches List of Patch objects. @return Text representation of patches.
Look through the patches and break up any which are longer than the maximum limit of the match algorithm. Intended to be called only from within patch_apply. @param patches List of Patch objects.
Merge a set of patches onto the text. Return a patched text, as well as an array of true/false values indicating which patches were applied. @param patches Array of Patch objects @param text Old text. @return Two element Object array, containing the new text and an array of bool values.