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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
This commit is contained in:
Grzegorz MartensandClaude Opus 5.5 committed 2026-11-09 17:02:56 +01:00
1 parent 650419766b
commit ed6af22b85
1 file changed
+2 -1
+2 -1
View File
@@ -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