mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-14 19:27:04 -04:00
* cos: decode only the first filter of a stream, strictly Stream::decoded_first_filter_strict decodes the outer filter of a chain and leaves the rest of the chain encoded, within a caller bound. The optimizer uses it to remove an ASCII85 or ASCIIHex wrapper without inflating the inner data. Co-Authored-By: Claude Haiku 5.5 <[email protected]> * optimize: strip redundant ASCII wrappers from filtered streams A stream whose filter array starts with ASCII85Decode or ASCIIHexDecode loses that outer layer when the serialized replacement is smaller. The inner encoded bytes are kept exactly, and the decoded stream is unchanged. Streams with DecodeParms, image, object stream, or Crypt filters are left alone, as are streams whose wrapper fails strict decoding. Co-Authored-By: Claude Haiku 5.5 <[email protected]> * optimize: document redundant ASCII-wrapper cleanup Co-Authored-By: Claude Haiku 5.5 <[email protected]> --------- Co-authored-by: Claude Haiku 5.5 <[email protected]>