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.

➡️ Stable 0.5x DevOps & Infrastructure
2,858
Comments
19
Years Active
5
Top Authors
#9110
Topic ID

Activity Over Time

2008
7
2009
12
2010
43
2011
38
2012
74
2013
63
2014
68
2015
124
2016
196
2017
119
2018
157
2019
125
2020
200
2021
359
2022
339
2023
286
2024
314
2025
315
2026
19

Keywords

e.g CRC hackermonthly.com GB MB RAR WWW FWIW ZIP VM file zip compression tar format files gzip compressed archive file format

Sample Comments

Aloha • Jan 23, 2019 • View on HN

How do zip archives solve these problems?

tomsthumb • Jul 24, 2022 • View on HN

Why should you couple your archive format to a compression algorithm?

akx • Oct 22, 2016 • View on HN

Another option, should you need better compression than zip with the same damage tolerance, is xz files in an uncompressed tar.

nwmcsween • Dec 10, 2018 • View on HN

Is there much stopping pack files being compressed with something else besides zlib?

dikei • Dec 20, 2022 • View on HN

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

hansel_der • Dec 15, 2021 • View on HN

yeawhy would you tar-up a single file w/o compression thou?

LeoPanthera • Jul 23, 2021 • View on HN

This ruins your compression ratio, since references between files becomes impossible.

dagw • Sep 6, 2010 • View on HN

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.

brians • Nov 23, 2014 • View on HN

Looks like a fine start. Compressing chunks together seems pretty dangerous; the ZIP file part is only safe if it doesn't compress.

mdavidn • Jul 24, 2022 • View on HN

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.