mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-02 22:41:47 -06:00
`ImageBudget::decode` is now the one public way to decode an image's CCITT fax or JBIG2 data: `Document::decoded_image` and `decoded_image_within`, which decoded with no limit on the work, are test-only in pdfcraft-cos, and pdfcraft-filters exports only `decode_ccitt_within` and `decode_jbig2_within`, which spend from a caller's allowance (`decode_jbig2` is gone, `decode_ccitt` private). So an operation over many images can't decode them without sharing an allowance; the compiler holds new callers to it. Doctests that must not compile check both crates; with the old entry points public they fail. Tests outside the crates decode through an unlimited ImageBudget. Streams in general (`Stream::decoded`) are left for a follow-up.