Unit DIFFMAKE |
**************************************************} { } { Difference Maker } { Copyright (c) 1997,1998 S.Kurinny & S.Kostinsky } { } {
Classes |
TDiffMaker -
Suppose that you must send to smb.
Functions |
CalculateCRC32 - Calculates CRC value for a given buffer.
CRC32Calc - Calculates CRC for a given memory buffer.
CRC32Finish - ----------------------------------------------------------------------} { Finishes calculation of CRC.
CRC32Start - Returns initialized CRC variable (Assigns value $FFFFFFFF to it).
DiffMakerRegister - -------------------------------------------------
DiffStreamCompress - Low level difference making routine.
DiffStreamExtract - Low level routine for applying delta (previously created with DiffStreamCompress procedure)
to the old data
-------------------------------------------------@param InStream stream with delta
@param UseStream stream that will be used (old version of a file)
@param OutStream output stream (new version of a file)
@see DiffStreamCompress
RegisterFileNamePropEdits - -------------------------------------------------} { Call this procedure to register filename property editor for
properties InFile,OutFile and UseFile of TDiffMake component.
Types |
Constants |
Variables |
Functions |
----------------------------------------------------------------------
Parameter | Description |
---|---|
Buf | memory buffer |
CRC | initial CRC value (result of previuos call to CRC32Calc or $FFFFFFFF). @BufSize buffer size. @result new CRC value |
Calculates CRC for a given memory buffer.
----------------------------------------------------------------------
----------------------------------------------------------------------} { Tests CRC algorythm. Returns true if Ok. This function is for testing purposes only and you don't need to call it.} {Function TestCRC:Boolean; Var CRC:Integer; begin CRC:=not CRC32Calc(TestString[1],$ffffffff,Length(TestString)); Result:=CRC=PKZIP_CRC; end;} {----------------------------------------------------------------------
----------------------------------------------------------------------
Parameter | Description |
---|---|
InStream | stream that need to be compressed (for example new version of a file) |
UseStream | stream that will be used (for example old version of a file) |
OutStream | output stream (delta file) |
MaxLev | compression level (10..1000, 10 - maximal speed, minimal compression ratio, 1000 - minimal speed, maximal compression ratio) @see DiffStreamExtract |
Low level difference making routine.
-------------------------------------------------
Parameter | Description |
---|---|
InStream | stream with delta |
UseStream | stream that will be used (old version of a file) |
OutStream | output stream (new version of a file) @see DiffStreamCompress |
Low level routine for applying delta (previously created with DiffStreamCompress procedure) to the old data
-------------------------------------------------
-------------------------------------------------
Types |
Constants |
Variables |