ZipToolView zip files online — 100% private

Solid archive: compressing files as one stream

A solid archive is one that compresses its files as a single continuous data stream rather than compressing each file independently. 7z and RAR do this by default, and a .tar.gz does it by construction (tar concatenates the files, then gzip compresses the whole bundle). The payoff is a better compression ratio, because the compressor’s dictionary can find matches *across* file boundaries instead of resetting for each entry.

Classic ZIP is the opposite: it compresses each entry separately with DEFLATE, so redundancy shared between files — repeated headers, duplicated boilerplate, common code — is compressed over and over, once per file, and never exploited. Solid compression closes that gap, which is a big part of why 7z archives are routinely smaller than zips of the same files.

Why compressing together helps

A dictionary coder like LZ77 or LZMA shrinks data by finding byte sequences it has seen before and replacing them with back-references. If it processes files one at a time, its dictionary only holds the current file’s contents, so a phrase that appears in file 2 but was already seen in file 1 is treated as new. If it processes the files as one stream, the dictionary holds everything seen so far, and that same phrase in file 2 becomes a short reference to file 1.

The gain is largest when an archive holds many similar files — a folder of source code, a batch of JSON logs, an image set with shared headers. In those cases, large fractions of each file repeat material already seen, and solid compression can remove most of it. For a single large unique file the advantage shrinks to near zero, because there is nothing cross-file to exploit.

Why ZIP is not solid

Classic ZIP compresses per entry: each local file header records a method (DEFLATE or Stored), and the entry’s bytes are compressed on their own. The format was designed for random access and incremental update — you can extract one file without touching the others, and you can add or replace an entry without recompressing the whole archive. That flexibility is incompatible with solid compression, which treats the whole archive as one block.

So ZIP trades ratio for agility: independent entries mean easy single-file extraction and editing, at the cost of compressing each file from a cold dictionary. 7z and RAR make the opposite trade: they give up cheap single-file extraction (extracting one file can require decompressing from a block boundary) in exchange for a noticeably better ratio. Different tools for different priorities — and why 7z is the choice for distribution and ZIP for exchange and editing.

The tar.gz case: solid by accident

A .tar.gz is solid not because of a special feature but because of how the pipeline is built. Tar concatenates files into one uncompressed stream; gzip then compresses that whole stream as a single DEFLATE block. The compressor never sees file boundaries, so it naturally exploits cross-file redundancy. The same is true of .tar.xz (LZMA over the tar stream) and .tar.zst. This is why a .tar.gz of many text files often beats a .zip of the same files despite both using DEFLATE under the hood.

Tradeoffs of solid compression

Solid is not free. Because the archive is compressed as a block, extracting a single file generally means decompressing from the start of its block, not just reading that file’s bytes — slower single-file access than ZIP’s random-entry model. Updating an archive (adding, deleting, or replacing a file) usually requires recompressing the affected block rather than swapping one entry. And corruption is more damaging: a damaged byte in a solid block can ruin everything downstream of it, where ZIP’s independent entries isolate the damage to one file. These are the costs behind the ratio win.

Frequently asked questions

What is a solid archive?

A solid archive is one that compresses all its files as a single continuous data stream rather than each file independently. Because the compressor’s dictionary then sees every file seen so far, it can replace repeated material across file boundaries with back-references, yielding a better compression ratio. 7z and RAR are solid by default; tar.gz is solid by construction.

Why is 7z smaller than ZIP?

For two reasons that often combine: 7z typically uses LZMA (a larger-dictionary, range-coded algorithm that beats DEFLATE), and it compresses files together as a solid archive so the dictionary finds matches across files. ZIP compresses each entry independently with DEFLATE, so shared redundancy between files is recompressed every time and never exploited across entries.

Is ZIP a solid archive?

No. Classic ZIP compresses each entry independently, so each file starts from a cold dictionary and cross-file redundancy is not exploited. ZIP trades the solid-ratio advantage for random access and easy single-file extraction and editing. Solid archives like 7z and RAR make the opposite trade.

What are the downsides of solid compression?

Extracting a single file can require decompressing from the start of its block, so single-file access is slower than ZIP’s random-entry model; updating the archive usually means recompressing a block rather than swapping one entry; and corruption is more damaging because a damaged byte can ruin everything downstream in the solid block, whereas ZIP’s independent entries isolate damage to one file.

Is tar.gz a solid archive?

Yes, by construction. Tar concatenates files into one uncompressed stream, and gzip then compresses that whole stream as a single DEFLATE block, so the compressor never sees file boundaries and naturally exploits cross-file redundancy. That is why a .tar.gz of many similar text files often beats a .zip of the same files even though both use DEFLATE.