From 5bef9b0e7176001c6816ad1da4e36fa4b18ff6d8 Mon Sep 17 00:00:00 2001 From: Grzegorz Martens Date: Mon, 2 Nov 2026 18:32:18 +0100 Subject: [PATCH] M8: the redact README says dictionaries are decoded within the allowance too Since b1f221611 the dictionaries read to know copies of them are decoded through the run's ImageBudget, every filter stage paid, as the images stored again are. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY --- crates/redact/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/redact/README.md b/crates/redact/README.md index 4dc1c2ad2c..1f1d11f0e3 100644 --- a/crates/redact/README.md +++ b/crates/redact/README.md @@ -37,8 +37,9 @@ clear_marks(&mut doc, None)?; // remove marks without app or a ring of references or a chain of more than 32, may be read again), and what it fetches, remembers and decodes (a decode that fails counting as much as it was allowed, and an image the dictionaries it names) counts against one budget for the run; past it the redaction is refused (`RedactError::SharedJbig2Budget`). The - images stored again are decoded within the run's image allowance, the JBIG2 decoder's own work - included, after what clearing spent: past it `apply` is refused as one clearing too many images is + images stored again, and the dictionaries read to know copies of them, are decoded within the + run's image allowance, every filter stage and the JBIG2 decoder's own work included, after what + clearing spent: past it `apply` is refused as one clearing too many images is (`RedactError::ImagesPastAllowance`), and `remove_hidden`, which chose no pages, as one past the run's budget. Codecs redaction doesn't decode (DCT, JPX) are removed whole (fail-closed), and so is a JBIG2 image whose page isn't its size (the renderer