You are not logged in.
Pages: 1
I am calling TZipWrite.AddDeflated and passing a filename and it's giving and Assert exception in SynZip.TSynZipCompressor.Seek
It seems the base TStream.CopyFrom routine has changed from D10.4 to D11.0 and now calls TStream.GetSize as part of it's CopyFrom code and now calls TSynZipCompressor.Seek(0, soFromEnd) to determin the stream size
I've changed the TSynZipCompressor code like this...
function TSynZipCompressor.Seek(Offset: Integer; Origin: Word): Longint;
begin
if not FInitialized then
result := 0 else
if (Offset = 0) and (Origin in [soFromCurrent, soFromEnd]) then // <== changed from (Origin = soFromCurrent) then // for TStream.Position
result := FStrm.total_in else begin
result := 0;
assert((Offset = 0) and (Origin = soFromBeginning) and (FStrm.total_in = 0));
end;
end;
Arnaud - is this correct. Should it work?
Offline
Should be fixed in https://github.com/synopse/mORMot2/commit/4ed9344c
With the proper 64-bit Seek() method.
Thanks for the report.
Offline
Pages: 1