Using ZLib
- From: "QS Computing" <qscomputing@xxxxxxxxx>
- Date: 28 May 2005 13:49:35 -0700
Hi,
I'm trying to use the ZLib units supplied with Delphi to decompress a
file. So far I've got the following test procedure:
procedure TForm1.Button1Click(Sender: TObject);
var FS1, FS2: TFileStream;
ZS: TDecompressionStream;
begin
FS1:=TFileStream.Create(ExtractFilePath(ParamStr(0))+'test.zlb',
fmOpenRead);
ZS:=TDecompressionStream.Create(FS1);
FS2:=TFileStream.Create(ExtractFilePath(ParamStr(0))+'test.bin',
fmCreate);
FS2.CopyFrom(ZS, 0);
FS1.Free();
FS2.Free();
ZS.Free();
end;
This doesn't work, because the length of the TDecompressionStream can't
be read. So how can I decompress this file?
Also, how can I create a array or list of an arbritrary number of
record types, that is not known before the program is run?
TIA,
- QS Computing.
.
- Follow-Ups:
- Re: Using ZLib
- From: J French
- Re: Using ZLib
- Prev by Date: Re: Delphi 2005 executes slower?
- Next by Date: Re: Delphi 2005 executes slower?
- Previous by thread: how can I tell if a tstringlist.savetofile has worked?
- Next by thread: Re: Using ZLib
- Index(es):