Files
pdfcraft/crates
cyfung1031andClaude Opus 5.5 b98505c810 M1: full saves are allocated at their exact size (#523)
`write_full` can't know the output size in advance, so its buffer grows by
doubling and the result kept up to as much again unused: 28 % for a 100 MB
save, 99 % for a 5 MB one. The result is often kept for as long as a document
is open. It becomes the working bytes after edits that need a full rewrite
(repaired files, security changes, redaction) through `write_incremental`, and
it backs Save As ▸ optimized and every new document from Create, Combine,
Extract and Split.

`shrink_to_fit` at the end drops the unused capacity. The bytes are the same.
On macOS the shrink happens in place (2 µs for 100 MB, the buffer doesn't
move), and full-save times are unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 12:18:59 -04:00
..
2026-10-07 16:03:57 -04:00
2026-10-08 13:06:33 -04:00
2026-10-07 16:03:57 -04:00
2026-10-08 13:06:33 -04:00