diff --git a/reference/xdiff/functions/xdiff-string-rabdiff.xml b/reference/xdiff/functions/xdiff-string-rabdiff.xml index 56c3ebcf0edd..f714967cb389 100644 --- a/reference/xdiff/functions/xdiff-string-rabdiff.xml +++ b/reference/xdiff/functions/xdiff-string-rabdiff.xml @@ -1,29 +1,33 @@ - + xdiff_string_rabdiff - Make binary diff of two strings using the Rabin's polynomial fingerprinting algorithm + Make a binary diff of two strings using the Rabin's polynomial fingerprinting algorithm - + &reftitle.description; - stringxdiff_string_bdiff + string|falsexdiff_string_rabdiff stringold_data stringnew_data - Makes a binary diff of two strings and returns the result. - The difference between this function and xdiff_string_bdiff is different - algorithm used which should result in faster execution and smaller diff produced. - This function works with both text and binary data. Resulting patch - can be later applied using xdiff_string_bpatch/xdiff_file_bpatch. + Makes a binary diff of two strings using the Rabin's polynomial fingerprinting algorithm implemented by + libxdiff. Compared to + xdiff_string_bdiff, this algorithm generally produces smaller diffs and operates faster, + while remaining fully compatible with xdiff_string_bpatch and + xdiff_file_bpatch for applying patches. + + + This function can be used with both text and binary data. The resulting diff data can later be applied to recreate + the new version from the old one. - For more details about differences between algorithm used please check libxdiff - website. + For further information about the algorithm, see the + libxdiff documentation. @@ -35,7 +39,7 @@ old_data - First string with binary data. It acts as "old" data. + The first string containing the "old" binary data. @@ -43,7 +47,7 @@ new_data - Second string with binary data. It acts as "new" data. + The second string containing the "new" binary data. @@ -54,8 +58,31 @@ &reftitle.returnvalues; - Returns string with binary diff containing differences between "old" and "new" - data or &false; if an internal error occurred. + Returns a binary diff string containing the differences between the old and new data, or + false if an internal error occurred. + + + + + &reftitle.examples; + + + <function>xdiff_string_rabdiff</function> example + + The following example creates a binary diff between two strings and stores it for later patching. + + + +]]> + + @@ -63,30 +90,32 @@ &reftitle.seealso; + xdiff_string_bdiff xdiff_string_bpatch + xdiff_file_bpatch - +