3 ms·
ZIP is a hot mess but that particular feature is not a bad idea, it's just poorly implemented / designed. The point was you could create a multi-disk zip (zip
by greggman3 6y ago
ZIP is a hot mess but that particular feature is not a bad idea, it's just poorly implemented / designed.
The point was you could create a multi-disk zip (zip came out when we had 1.4meg floppy disks). If you zip up 10meg across 7 disks and you want to update the README of your 7 disks, by putting the central directory at the end you just ask the user to insert disk 7, read the central directory, append the new README, write a new central directory. With the directory at the start you'd have to re-write all 7 disks. With it at the end you only have to re-write disk 7 and only a small portion of the file.
The only bad part of that particular feature in the zip implementation is the scanning part. The variable sized underspecified "Zip comment" that you have to scan through should have either come before the central directory OR there should have been a length or pointer to directory after it so no scanning needed.
- anyfoo 6y agoAlso what would have been wrong with having a fixed size trailer/footer at the end of the file, pointing back to the (possibly newly appended) central directory, and even back to the previous trailer/footer if chaining is necessary/useful? No scanning necessary, then.
- silvestrov 6y agoThe PDF format does this correctly. PDF files end with: startxref 12345 %%EOF where 12345 is the file offset of the TOC.
- wilsonrocks 6y agoMany memories of PKZip asking me to insert the last disk of a set :) Usually when copying a game...
- ungamedplayer 6y agoAnd disk (total / 2 + 1) was the corrupted one, you'd only find it mid way through.