zstream - multiple calls of TCompressionStream.Flush writes to dest stream
Original Reporter info from Mantis: Petr-K
-
Reporter name:
Original Reporter info from Mantis: Petr-K
- Reporter name:
Description:
I do not hawe enough courage to fix it :).
Steps to reproduce:
{$mode objfpc}
uses classes, zstream;
var
c: TCompressionStream;
st: TMemoryStream;
begin
st := TMemoryStream.Create;
c := TCompressionStream.Create(clfastest, st, true);
try
c.WriteByte(1);
writeln(st.Size); //0 ok
c.Flush;
writeln(st.Size); //3 ok
c.Flush;
writeln(st.Size); //6 error
finally
c.Free;
writeln(st.Size); //9 error - Free calls Flush explicitly
st.Free;
end;
end.
Mantis conversion info:
- Mantis ID: 34112
- Build: Revision: 36503
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 39607 (#64e4f169)
- Target version: 3.2.0