Unit aDiff |
*****************************************************************} { } { Diff Maker } { Copyright (c) 1997 S.Kurinny & S.Kostinsky } { } { 2/20/98 Modified by Gregory L. Bullock (bullock@mbay.net) so } { Delphi 1.0 will compile: } { Changed "Integer" to "LongInt" } { Changed useofs & bufofs in t3word from LongInt to word. } { Changed arrays with size MaxHashValue (= 131071) to } { 2-D with subarrays smaller than $FFF0. } { Reduced BufSize from 2048*1024. } { Converted Comp(...) to Pascal. } { I haven't confirmed this, but I suspect that this } { version still compiles under D2. The only changes that } { aren't protected by a "$IFDEF Win32" directive are the } { integer-to-longint and the longint-to-word conversions. } { I believe longint and word are both 4-byte data types } { in D2, so I don't think these changes will affect D2. } { } {
Classes |
Functions |
CalcHash - -------------------------------------------------} { Calculates hash value
3 bytes to 0.
comp - Compares buffers and returns number of equal bytes
Len - max length
----------------------------------------------------------------} {$IFDEF Win32
DiffCompress - --------------------------------------------------------
DiffStreamCompress - -------------------------------------------------
DiffStreamExtract - -------------------------------------------------
Max - -----------------------------------------
Min - -----------------------------------------
Types |
PByteArray
PLongInt
TByteArray
TByteArray
TDiffCompData
TMyProcedure
Constants |
Variables |
Functions |
-------------------------------------------------
----------------------------------------------------------------} {$IFDEF Win32
Types |
PByteArray=^TByteArray
PLongInt=^LongInt
TByteArray=Array[1..$FFFF] of byte;
TByteArray=Array[1..MaxInt] of byte;
TDiffCompData = record
InBuf : PByteArray;
UseBuf : PByteArray;
InBufSize : LongInt;
UseBufSize : LongInt;
MaxLevel : LongInt;
MaxLength : LongInt;
MinLength : LongInt;
OutBuf : PByteArray;
OutSpBuf : PByteArray;
OutBufSize : PLongInt;
OutSpBufSize : PLongInt;
EnoughLen : LongInt;
end;
TMyProcedure=procedure
Constants |
Variables |