New modules: plugin, requests, screenshot, pending, host, transport (non-wasm).
transport_tests and screenshot_geometry_tests move with their code;
lifecycle_tests and pointer_tests stay.
New modules: app (construction, queries, eframe::App, and every impl PdfCraftApp group, split further next), state (UI state types, OpenRequest, OpenOutcome, GridFile, CopyPage, DocumentCopyJob), hooks (host-hook types). PendingOpen, GridDrop and DocumentCopy stay in lib.rs as app struct field types.
serialize wrote every byte of a hex string, every integer and every object
number through write!. A table lookup and a small digit loop give the same
bytes in a fraction of the instructions. The octal escape in literal strings
and the #xx escape in names use the same helpers.
Fixes#4870
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
write_full parsed each object once to number it and again, after the
128-object reader cache had dropped it, to write it. Keep the parsed object
from the traversal and write that, within a budget of 64 MiB of owned bytes
and 2M tree nodes; past it the object is read again as before, which keeps
the memory bound and the "read differently while saving" check.
Fixes#4869
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Reconstruct parsed every object to see whether it is an object stream, and
searched each object's next 1,024 bytes and the whole file byte by byte.
Only objects whose dictionary holds ObjStm or a # (a name can hide letters as
#xx) are now parsed for that check. Every /XRef position is found once, and
find() scans for the needle's rarest byte in 32-byte blocks. The index, trailer
and repair log are unchanged.
Fixes#4868
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ObjectReader::try_get measured every parsed object in its cache (up to 128)
after each read to check the byte budget. Keep a running total instead and
measure the whole cache only when something other than one freshly parsed
object changed it. Eviction timing is unchanged, so output is identical.
Fixes#4867
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>