Unit ZipRead

Classes

Functions

CloseZipFile - only clears ioresult variable
GetFirstInZip - ************** Get first entry from ZIP file
GetNextInZip - ************** Get next entry from ZIP file
isZip - ************** VERY simple test for zip file

Types

buftype
pHeaderInfo
TDirtype
tHeaderInfo
TPackRec

Constants

zip_FileError
zip_InternalError
zip_inuse
zip_NoMoreItems
zip_ok

Variables


Functions


procedure CloseZipFile(var Zprec:tPackRec);

only clears ioresult variable

function GetFirstInZip(zipfilename:pchar;var zprec:tPackRec):integer;

************** Get first entry from ZIP file

function GetNextInZip(var Zprec:tPackRec):integer;

************** Get next entry from ZIP file

function isZip(filename:pchar):boolean;

************** VERY simple test for zip file

Types


buftype=array[0..65000] of char;

pHeaderInfo = ^tHeaderInfo
Warning, new Structure tPackRec, the same for all packers!} {$R-} {no range checking!
TDirtype=array[0..259] of char;

tHeaderInfo = record
ExeId : Array[0..1] Of Char;
Remainder : Word
size : Word
end;
EXE-Header
TPackRec = record
buf : ^buftype;
bufsize : word;
localstart : word;
globalpos : longint;
Time : Longint;
Size : Longint;
CompressSize : Longint;
headeroffset : Longint;
CRC : Longint;
FileName : tdirtype;
PackMethod : word;
Attr : word;
flags : word;
end;

Constants

zip_FileError = -1

zip_InternalError = -2

Accessing file

zip_inuse = -10

zip_NoMoreItems = 1

Error in zip format

zip_ok = 0


Variables