I've not looked at the Self-Extractor code that is prefixed so I can't comment on how that is done. It depends on how links from the "central" directory to the individual "local" directories and their streams are done. I have forgotten the details.
I am not certain that (1) works as described. I don't recall any mention of it in the Zip specification. I must look for that too. Most of the Zip tools have a test mode where the archive integrity is assessed. It would be useful to see what they do when there are duplicate local file directories with the same name. - Dennis -----Original Message----- From: Peter Kelly [mailto:pmke...@apache.org] Sent: Saturday, August 1, 2015 08:42 To: dev@corinthia.incubator.apache.org Subject: Re: Zip madness ! [ ... ] 1) You can “modify” the contents of a zip file simply by appending (with the compressed content of new/changed files added, and a new directory listing including these files, an *not* including any files which have been “deleted”, i.e. masked out). 2) A zip file can be appended to the end of another file format; the most common example being self-extracting .exe files. Since .exe files are read from the beginning, the program loader on windows doesn’t care about the fact that there’s the trailing data at the end. And it’s still a valid zip file, since the .exe content at the start is ignored when reading the directory listing. I think you may be aware of some of these details already, and there’s some nuances I’ve probably missed. I’m about to have a look through the code you currently have in the branch. [ ... ]