On Thu Nov 9 20:21:44 2023 +0000, Nikolay Sivov wrote:
Writing them separately makes it easier because I don't need to know total unstructured size in advance. It won't complicate anything, I don't think. Offsets are relative to the beginning of unstructured block, so writing both, collecting stats for the header, and then doing header+buffer 1+buffer 2, should be enough. One additional feature that's easy to add later is deduplicate string data - on windows you won't get the same string twice, except for fx_2_0. I haven't checked in details how it's stored there. It should work fine without this storage optimization.
That works too, but with set_u32() you don't need to know sizes in advance either, you just go back and set them once you do know.