Archive Compression Formats
Discussions center on trade-offs between ZIP and TAR formats, including compression efficiency, random access, damage tolerance, and decoupling archiving from specific compression algorithms like gzip, xz, and zstd.
Activity Over Time
Top Contributors
Keywords
Sample Comments
How do zip archives solve these problems?
Why should you couple your archive format to a compression algorithm?
Another option, should you need better compression than zip with the same damage tolerance, is xz files in an uncompressed tar.
Is there much stopping pack files being compressed with something else besides zlib?
You are conflating compression algorithms with archive file formats.Use `tar` format and you can combine it with whatever compression utilities available such as `gzip`, `bzip2`, `lz4`, `zstd`, `xz`, etc. `tar` also preserves Unix permission. The downside is tar doesn't have an index for random-access, so you cannot do partial extraction quickly.Use `zip` format if you don't care about Unix permission, and want to do partial extraction. `Zip` technically support multiple compress
yeawhy would you tar-up a single file w/o compression thou?
This ruins your compression ratio, since references between files becomes impossible.
The pkzip format allows you to "zip" data uncompressed if you are worried about that. Then you can trivially unpack your files using nothing but seek and read for those cases where you also accidentally misplace your last copy of unzip.
Looks like a fine start. Compressing chunks together seems pretty dangerous; the ZIP file part is only safe if it doesn't compress.
One advantage of tar is that, because the format has no built-in support for compression or random access, the entire archive is compressed together. Similarities in adjacent files will improve the compression ratio.To support random access, the ZIP format must compress each file separately.