Not relying on /Length field for object parsing
Two TODO entries:
-
parse stream objects without reference to their /Length entry by simply trying all possible ways and consistency-checking them against the xref table in the end, via h_attr_bool(). XXX is this actually possible (without unreasonable complications)?
-
(maybe?) change stream parsing to just stop at "endstream endobj" when /Length is indirect and the filter or postordinate parser doesn't delimit itself. this is not strictly to-spec, but probably an OK restriction to make in practice. a consistency checks can be made against the length after all objects have been parsed.
Click to expand
note: the current design aims to follow the spec to the letter in that the /Length entry of a stream determines its length, and nothing else. from this it follows that we must find and parse these lengths in "island style". thus, the current code is a hybrid of linear and island parsing. if the reliance on /Length can be broken, the island-based resolver can go and we can have a proper split between two separate parsers - one pure linear and one pure island.