From: "Thomas Søndergaard" Date: 2002-07-10T00:20:46+09:00 Subject: Re: SV: SV: [ANN] Archive 0.2 > So the assumption is that headers precede data? > > Note that the Zip format usually has two headers per file: one before > the file data, and one at the very end of the file. > > So ideally the archive reader would get the stream first and read the > end directory if the stream was seekable, then position before the > first header. The information in the central directory structure is not too relevant unless you want to extract the entry to a filesystem, in which case the permission attributes will be relevant. Maybe someone will miss the entry comment field, which is not in the local header either. > Then as individual pre-file headers were read, their information could > be merged as appropriate with the end-of-zip (Central Directory) > information. The local headers do not carry any information that is not in the central directory, so if you have already read the central directory entry, no merging is necessary. Thomas