mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-30 05:16:56 -06:00
Images carried inside a `.fig` message (`image.dataBlob` indexing the message's `blobs`) were copied out before the message is dropped, one copy per image hash. Nothing stops a file from pointing many hashes at one blob: 100 hashes on a 250 MB blob made 25 GB of copies, an out-of-memory abort from a small file. The walk now records each hash's blob index, and `embedded_copies` makes one shared copy per blob for every hash that names it, so the copies are bounded by the message's own size. Each resolved image is still copied once on its way into the document, where images are kept by content hash. Regression: fifty hashes on one blob share one copy; a hash naming a missing blob is left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LvG6Dyzof21BCrUsByhx2w