Class TForm1 (unit teststringdiff) |
TForm
Test the string difference unit Barry Brannan, September 1997. barrylb@poboxes.com http://www.poboxes.com/barrylb To test... Type text into "Original" edit box. Type text into "Second" edit box. Press the "Compute Diff" button, and the "difference map" will be displayed. BINARY FILES: The diference routines work with Pascal long strings which means they can handle arbitrary binary files. However you must be careful when copying between Windows edit controls and similar data storage because the string is truncated at the first null. Use the LoadStringFromFile function below to load an arbitrary binary file into a string. BLOCK SIZE: Remember to adjust the block size depending on speed requirements and the size of the strings. There is a maximum of 65535 blocks in the original string. So * maximum string size for a block size of 1 is 65535 * maximum string size for a block size of 2 is 65535*2 * maximum string size for a block size of n is 65535*n Or, minimum block size for a string of length m is (1 + ((m-1) div 65535))
Constructors |
Functions |
Properties |
Events |
Variables |
Constructors |
Functions |
read-only
Properties |
Events |
Variables |