mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-28 14:21:35 +01: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;
|
M := TMemoryStream.Create;
|
||||||
X.FStream.Write(M);
|
X.FStream.Write(M);
|
||||||
d := M.Size;
|
d := M.Size;
|
||||||
X.Dict.AddInteger('Length', M.Size);
|
|
||||||
|
|
||||||
if poCompressText in Options then
|
if poCompressText in Options then
|
||||||
begin
|
begin
|
||||||
MCompressed := TMemoryStream.Create;
|
MCompressed := TMemoryStream.Create;
|
||||||
CompressStream(M, MCompressed);
|
CompressStream(M, MCompressed);
|
||||||
X.Dict.AddName('Filter', 'FlateDecode');
|
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;
|
end;
|
||||||
|
X.Dict.AddInteger('Length', d);
|
||||||
|
|
||||||
X.Dict.Write(AStream);
|
X.Dict.Write(AStream);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user