Parses exactly one COS object from bytes.
public static CosObject Parse(ReadOnlySpan<byte> bytes)
The object's syntax, optionally surrounded by white-space and comments.
ISO 32000-2 §7.2 and §7.3. A stream (a dictionary followed by stream … endstream) takes its data extent from a
direct Length entry; when Length is an indirect reference, the data ends at the endstream keyword.
The N G obj … endobj wrapper of an indirect object definition is file structure (§7.3.10) and is not accepted here.