by layer8 · 10mo ago · 0 comments
PDF is designed to not require holding the complete file in memory. (PDF viewers can display PDFs larger than available memory, as long as the currently displayed page and associated metadata fits in memory. Similar for editing.)
ABCDE, to insert 1 after C: store D, overwrite D with 1, store E, overwrite E with D, write E.