3 ms·
Since ZIP files have their header at the end of the file, perhaps the disk image could also be a valid ZIP file?
by TazeTSchnitzel 7y ago
Since ZIP files have their header at the end of the file, perhaps the disk image could also be a valid ZIP file?
- wahern 7y agoZIP files also have inline headers with duplicate metadata that may or may not be the same (e.g. filenames can and do differ). That's why I've always felt conflicted over ZIP. On the one hand, having a contiguous index is nice from a performance optimization standpoint, and that's why ZIP is more commonly adopted to build upon, such as JAR files. On the other hand, the potential for (and actuality of) conflicting metadata is a nightmare from a security perspective, and it violates several rules of thumb in software engineering, such as that there should only ever be a single source of truth (major), a single parse (major), and to avoid duplicating data or context (minor, but can be sufficient to ensure there's only ever a single source of truth and a single parse), which generally ease implementation and help ensure consistent behavior. Likewise, while combining the container format and compression can improve convenience and user experience (especially if there's a single dominate implementation), it's also nice to keep these layers separate, which not only provides simplicity and consistency benefits, but also permits them to evolve independently.