-
Notifications
You must be signed in to change notification settings - Fork 15
New archive format
WIP describing my current vision of new archive format that may supersede .arc in future versions of FA'Next.
Entire descriptor size (plus block size if inlined) should be no more than 4096 bytes and no less than 12 bytes (i.e signature plus 8 bytes it verifies).
So, the minimum archive size will be 2*4 bytes (initial/ending fixed signatures) + 4 bytes (descriptor signature) + 4 bytes (descriptor+block checksum) + 2 bytes (block type and size) = 18 bytes. Plus directory block and solid block contents. At last, minimum archive size should be smaller than rar (66 bytes) and 7z (91 bytes).
This block may contain any archive meta-information, individual fields/groups are enabled by flags. All flags are placed at the block header, but as a matter of сonvenience, we describe them in corresponding chapters.
When multiple solid blocks may be interleaved, their output can be described with the same list, but output number should be global among all solid blocks in this directory block. It's important to allow correct processing even when archiver know only subset of compression algorithms and therefore cannot determine by itself number of output blocks for some algorithms.
....
Even if program can't recognize some field ID, it knows how to entirely skip it and go to processing of the next field. Record with ID=0/"" is reserved for "EOF" flag and doesn't include data. Further bytes (if any) can be interpreted only by future FA versions. If there is no further data, record with ID=0/"" isn't necessary, since end of control block is interpreted as end of custom fields.
To do: some way to specify fields mandatory for open/list/extract/update operations - if program can't recognize field ID, it should refuse to perfrom these operations. Plus bit flag(s) specifying whether to copy unknown records to new archive.