mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Zip - slow gzip-file opening
(cherry picked from commit 8cd00f4a05)
This commit is contained in:
parent
8e8460b5cb
commit
bc5a9fda5e
1 changed files with 7 additions and 1 deletions
|
|
@ -79,11 +79,17 @@ end;
|
|||
function Inflate(aSource: TStream; aDest: TStream;
|
||||
aHelper: TAbDeflateHelper): longint;
|
||||
var
|
||||
ACount: Int64;
|
||||
AInflateStream: TInflateStream;
|
||||
begin
|
||||
AInflateStream:= TInflateStream.Create(aSource, True);
|
||||
try
|
||||
aHelper.NormalSize:= aDest.CopyFrom(AInflateStream, aHelper.NormalSize);
|
||||
if aHelper.PartialSize > 0 then
|
||||
ACount:= aHelper.PartialSize
|
||||
else begin
|
||||
ACount:= aHelper.NormalSize;
|
||||
end;
|
||||
aHelper.NormalSize:= aDest.CopyFrom(AInflateStream, ACount);
|
||||
aHelper.CompressedSize:= AInflateStream.compressed_read;
|
||||
Result:= LongInt(AInflateStream.FHash);
|
||||
finally
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue