```c Archive {------------------------------}, |____________| |_| |______| |_| Data | | Terminator (Signals EOF) | Metadata Metadata terminator (signals beginning of metadata)```
Picking the right terminators and data representations will likely not be a trivial task; best understand something like zip or tar and try and reimplement something similar so that you don't experience full pain of reinventing not just a wheel but the whole ecosystem