* Reset resets stream to beginning to zstream, not beginning of file.

* Readpng resets source stream to start of zstream before creating
    Tdecompressionstream, rather than seek the decompression stream.

git-svn-id: trunk@9377 -
This commit is contained in:
daniel 2007-12-02 09:51:19 +00:00
parent 38048fd073
commit 10796b2d84
2 changed files with 2 additions and 2 deletions

View File

@ -803,9 +803,9 @@ begin
ReadChunk;
HandleChunk;
end;
ZData.position:=0;
Decompress := TDecompressionStream.Create (ZData);
try
Decompress.position := 0;
DoDecompress;
finally
Decompress.Free;

View File

@ -309,9 +309,9 @@ procedure Tdecompressionstream.reset;
var err:smallint;
begin
source.seek(-compressed_read,sofromcurrent);
raw_read:=0;
compressed_read:=0;
source.position:=0;
inflateEnd(Fstream);
if skipheader then
err:=inflateInit2(Fstream,-MAX_WBITS)