3
I have noticed that most files resulting from a compression / archive process do not have a list of the files contained at the beginning of the resulting file, but rather at the end of it. For example, ZIP files contains partial headers for each file, and at the end they have a Central Directory in where the names of all the files are stored. A similar thing occurred with TAR files.
Is there any compression / archive method that puts a summary of the files contained within the resulting file at the very beginning of it?
Just for curiosity's sake, why are you interested in where the listing is inside an archive? – Doktoro Reichard – 2014-07-13T22:57:21.427
@DoktoroReichard, just out of curiosity :) - I answered this question some time ago, and the fact that I don't know any format that keeps a summary of the files contained at the beginning of it haunted me since then... Get number of files from zip file header before fully uploaded. Is not that I can't sleep at nights, but it would be good to know, for the same reason the OP asked the question in StackOverflow. Thanks for checking =)
– jimm-cl – 2014-07-14T14:00:14.2573Well, there is an upside (that I can see) to storing the central directory listing on the end of the file: it eases the process of adding more files later on. If the directory listing was on the start, the whole file would have to be rewritten (which decreases efficiency the bigger the file is). – Doktoro Reichard – 2014-07-14T16:16:09.150
@DoktoroReichard, you are completely right :) – jimm-cl – 2014-07-14T16:20:52.807
1
I've recently found that ISO images are the only one that contains redundant path tables right after the volume descriptors in the header. In fact, if you build a large iso image and then truncate it you will still be able to list all the files inside!
– eadmaster – 2016-07-18T05:36:41.890