Re:The Perils of File Typing
by JeremyBanks on Monday December 07, 2020 @04:20AM
(#25330579)
It's valid if you're not reading a generic zip file but instead a zip derived format like this.
Re:The Perils of File Typing
by alisonkisk on Sunday December 06, 2020 @01:28PM
(#25325400)
Since editing a document doesn't change its type, this objection doesn't apply to zip-based filetypes.
It was designed this way because it comes from the era of floppy disks. If you had a zip file spanning multiple discs and you wanted to update `firstfile.txt` at the front of the zip file you didn't want to have to insert all 10 disks and read and re-write all the data. You just wanted to insert the last disk, read the table of contents, append your new `firstfile.txt` and write a new table of contents. The invalid `firstfile.txt` still exists at the front but it's ignored by the table of contents.
If you're going do stupid tricks by scanning from the front then you'd be better off choosing a format for which that's actually valid like .tar.gz or something