You are not logged in.
I used the following method to extract it,Error on line 880 of mormot.lib.z:Error -3[data error] during TsynZipDecompressor.write process(avail in =131070 out=131072)
function TmainForm.GUnZipFile(aSrcFile, aDestFile: TFileName; aIsFile: Boolean
): boolean;
var
gz: TSynZipDeCompressor;
s, d: TStream;
vfn:TFileName;
begin
try
s := TFileStreamEx.Create(aSrcFile, fmOpenReadDenyNone);
try
if aIsFile then
vfn:=aDestFile
else
vfn:=aDestFile+extractFileName(aSrcFile);
d := TFileStreamEx.Create(vfn, fmCreate);
try
gz := TSynZipDeCompressor.Create(d,szcFzip{, szcfGZ});
try
StreamCopyUntilEnd(s, gz);
result := true;
finally
gz.Free;
end;
finally
d.Free;
end;
finally
s.Free;
end;
except
result := false;
end;
end;
Last edited by lfyey121 (2023-10-28 07:21:49)
Offline
When TSynZipDecompressor. Create (d, szcfRaw), the error is: (avail in = 131071 out = 131072)
Offline