Here's a place where the specification is just flat out ambiguous (yet again, a tiny example would have resolved the problem).
If the line break character is LF, what is the length of the following stream:
stream
ABCDE
endstream
In C++: "stream\nABCDE\nendstream"
Is it 5 because the LF after streamis not counted? Is it 6, because the LF after streamis counted? The specification says that the trailing LF is not counted, but it is mute on the LF after stream.
Also, I encountered this in a file (not one of mine):
<</Length 0>>
stream
endstream
"<</Length 0>>\nstream\n\nendstream"
The above suggests that additional line breaks within a stream may not always be part of the length? If so, is does this apply to leading LFs, trailing LFs, or both?
If the line break character is LF, what is the length of the following stream:
stream
ABCDE
endstream
In C++: "stream\nABCDE\nendstream"
Is it 5 because the LF after streamis not counted? Is it 6, because the LF after streamis counted? The specification says that the trailing LF is not counted, but it is mute on the LF after stream.
Also, I encountered this in a file (not one of mine):
<</Length 0>>
stream
endstream
"<</Length 0>>\nstream\n\nendstream"
The above suggests that additional line breaks within a stream may not always be part of the length? If so, is does this apply to leading LFs, trailing LFs, or both?