www.pudn.com > lzss.rar   To Read all the content


[file head]:
{
CHIEFLZ UNIT/DLL, by Dr A Olowofoyeku (the African Chief);
internet: laa12@cc.keele.ac.uk
http://ourworld.compuserve.com/homepages/African_Chief/

Version 1.00.

USES the original LZSSUNIT source, as amended by the Chief,
and Chris J Rankin. Ported to Win32 (Delphi 2.0) by Chris Rankin.

// -----------------------------------------------------------//
* 16-bit ASM functions converted to 32-bit ASM by Chris J Rankin
* Win32 (Delphi 2.0) code: added by Chris J Rankin

Package assembled together for first public release: 5th September 1996.

The routines in this package are already being used in some famous
programs!

}



{----------------------------------------------------------------------}
{to compile to a DLL in Delphi you need to rename this with the
extension .DPR}

{$I LZDefine.inc} {// defines various things, including "aDLL" //}

{$ifDef aDLL}
Library ChiefLZ;

Uses
{$ifdef Win32}
ShareMem, // Bec
... ...

[file tail]:
... ...
ty things to DLLs if:
(a) You include an initialisation section (even an empty one)
and
(b) You declare an uninitialised Global string variable; either
on its own or as part of a record.

I have therefore tried to work around this by pre-initialising as
many of the global variables as possible (in the 32-bit code). Note
that BlankRec contains a field called Name, which is a long-string
in the Delphi 2 version !!!
}
{$ifdef aDLL}
begin { <<< Crash And Burn warning !!!! }
{$else aDLL} { Must have NO uninitialised global long-string vars!! }
initialization
{$endif aDLL}
{$else Win32}
Begin
{
These variables can be initialised here in the 16-bit version ...
}
HeapError := @HeapFunc; { Specific to 16-bit code }

FillChar(BlankRec, SizeOf(BlankRec), 0);
LZReportProc := Nil;
{$endif Win32}
Decompressing :=False;
{
These variables MUST be initialised here ...
}
LZReadProc := MyReadProc;
LZWriteProc := MyWriteProc
End.