mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:29:28 +02:00
* Fix bug #34001: wrong stream length for compressed text
git-svn-id: trunk@39469 -
This commit is contained in:
parent
2cf8a9661f
commit
3acdf481c2
@ -4295,15 +4295,16 @@ begin
|
||||
M := TMemoryStream.Create;
|
||||
X.FStream.Write(M);
|
||||
d := M.Size;
|
||||
X.Dict.AddInteger('Length', M.Size);
|
||||
|
||||
if poCompressText in Options then
|
||||
begin
|
||||
MCompressed := TMemoryStream.Create;
|
||||
CompressStream(M, MCompressed);
|
||||
X.Dict.AddName('Filter', 'FlateDecode');
|
||||
X.Dict.AddInteger('Length1', MCompressed.Size);
|
||||
//X.Dict.AddInteger('Length1', MCompressed.Size); //Missing 'endstream' or incorrect stream length|stream Length incorrect
|
||||
d := MCompressed.Size;
|
||||
end;
|
||||
X.Dict.AddInteger('Length', d);
|
||||
|
||||
X.Dict.Write(AStream);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user