mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-27 03:27:21 -06:00
docs(filters, model): record the filter chain and inherited copy limits
This commit is contained in:
@@ -23,7 +23,7 @@ encode_flate(data) -> Vec<u8> // zlib, level 6
|
||||
```
|
||||
|
||||
- `chain` is applied first to last, as in a `/Filter` array.
|
||||
- Image codecs (DCT, JPX, JBIG2, CCITT), `Crypt` and unknown filters anywhere in a chain give `Unsupported`: callers keep such data encoded. Decryption belongs to `crypt`.
|
||||
- Image codecs (DCT, JPX, JBIG2, CCITT), `Crypt` and unknown filters anywhere in a chain give `Unsupported`: callers keep such data encoded. So does a chain longer than `MAX_CHAIN` (8) filters, before any stage runs. Decryption belongs to `crypt`.
|
||||
- `max_output` bounds every intermediate buffer (including the pre-predictor buffer) and gives `LimitExceeded(max_output)`. This also holds when Flate retries raw deflate after a misleading zlib header, in both strict and tolerant decoding.
|
||||
- `decode_tolerant` turns `Corrupt` into "what was decoded so far" plus `partial = true`, then runs the rest of the chain on it (predictors are applied to partial output too). `LimitExceeded` and `Unsupported` are still errors.
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@ L3/L4 crates need:
|
||||
The page-tree walk keeps one cursor per ancestor and shares inherited attribute owners.
|
||||
Repeated child references are skipped before copying attributes, with first depth-first
|
||||
occurrence order preserved. Returned page dictionaries still own their effective attributes.
|
||||
A walk copies at most `MAX_INHERITED_COPIES` (1 GiB, approximate heap bytes) of inherited
|
||||
values into the leaves; past it the walk stops, as it does past its leaf cap, and the pages
|
||||
after that point are not listed.
|
||||
|
||||
`organize`, `annot` and `forms` still carry their own small walkers; they move here as the model
|
||||
grows (ADR-0004).
|
||||
|
||||
Reference in New Issue
Block a user