From ed6af22b85a71dd65de844c37601a19e4b7729b5 Mon Sep 17 00:00:00 2001 From: Grzegorz Martens Date: Mon, 9 Nov 2026 17:02:56 +0100 Subject: [PATCH] redact: the README says a value read through another generation may be read again Since 0a00862e9, what an image is stored again with (its size, filters and parameters) is remembered by number and generation, so a value reached through a reference of another generation is fetched again rather than taken from what the reference of its object's own generation read. The README's list of what may be read again now says so. What an image names is still remembered by object number, so a dictionary named that way isn't read again. The same sentence said a chain of more than 32 references may be read again. `names_in` follows 33 references before it gives up on a chain, as `a_chain_of_references_is_named_to_the_limit` says, so it is more than 33. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY --- crates/redact/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/redact/README.md b/crates/redact/README.md index 58ad827458..8ede966ae8 100644 --- a/crates/redact/README.md +++ b/crates/redact/README.md @@ -39,7 +39,8 @@ clear_marks(&mut doc, None)?; // remove marks without app compare generations draws it (cos reads such a reference as null); what one is stored again with, its size, filters and parameters, is read as cos reads it. Finding what to store again reads each object at most once for each way it is read (a `/JBIG2Globals` chain named part way, - 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 + a ring of references or a chain of more than 33, or a value read through a reference of another + generation, 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, and the dictionaries read to know copies of them, are decoded within the