-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Hi, there is a problem within the function tsdBufferWriter.write:
A tByteArray is used for the WriteChunk call but the tByteArray has a limit of 32k. In my case, I have disabled the ChunkWrites:
function TsdBufferWriter.Write(const Buffer; Count: Integer): Longint;
var
Idx, Siz: integer;
begin
// index in the source buffer
Idx := 0;
// remaining size
Siz := Count;
fSource.WriteBuffer(Buffer, Count); // write everything at once
{ // code starting from here makes problems with big content!
// surplus
while FRawPosition + Siz >= FChunkSize do
begin
Move(TByteArray(Buffer)[Idx], FRawBuffer[FRawPosition], FChunkSize - FRawPosition);
WriteChunk(FChunkSize);
dec(Siz, FChunkSize - FRawPosition);
inc(Idx, FChunkSize - FRawPosition);
FRawPosition := 0;
end;
// copy the raw buffer
Move(TByteArray(Buffer)[Idx], FRawBuffer[FRawPosition], Siz);
}
inc(FRawPosition, Siz);
Result := Count;
end;