On Thu Nov 9 20:14:48 2023 +0000, Zebediah Figura wrote:
I say this mostly because, in the current form, it's not obvious that we need to do anything that complex. I.e. we can write sections one at a time, recording counts and sizes as we do so, and then go back and write those counts and sizes in the header. Maybe further logic will complicate that approach, though...
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.