* 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; ReadChunk;
HandleChunk; HandleChunk;
end; end;
ZData.position:=0;
Decompress := TDecompressionStream.Create (ZData); Decompress := TDecompressionStream.Create (ZData);
try try
Decompress.position := 0;
DoDecompress; DoDecompress;
finally finally
Decompress.Free; Decompress.Free;

View File

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