Knowledge Base

What’s The Compressed Size Of A File?

zip-compressed-size

When checking the hidden meta information of an archive file, e.g. ZIP or RAR, you will come across the Compressed Size of said file. Find out what that means.

Compressed Size is how much room content takes up after it has been compressed, which is to say how much space it occupies while it is still packed inside the archive. It is the counterpart of the uncompressed size, the figure for the same content once it has been unpacked again.

Which files carry it, and where the number comes from

You meet this figure in archive files. ZIP is the obvious one, and it brings a long list of relatives with it, because a great many everyday formats are ZIP containers underneath: .docx, .xlsx and .pptx documents, .odt files, .epub e-books, and the .jar and .apk files that hold Java and Android applications. RAR, 7z and other archive formats record the same pair of figures in their own way.

The number is written by the compression program at the moment a file is added, and never by a person. That means 7-Zip, WinRAR, WinZip, the Archive Utility on macOS, the compressed folder command in Windows, or the zip command line tool. An archive stores the figure once for each file it contains, next to that file's name, its uncompressed size and its checksum, so a report can show you one value per member file or a single figure for the archive as a whole.

What a typical value looks like

A whole number of bytes. A plain text file of 1,000,000 bytes might appear as 243120 bytes compressed once it is inside the archive. Some tools display the same number converted to KB or MB instead.

The figure only becomes meaningful next to the uncompressed size. Text, spreadsheets, documents, log files and uncompressed images such as BMP shrink a great deal. JPEG photos, MP3 and AAC audio, MP4 video and PDFs that are already full of compressed images barely move, and their compressed size comes out close to the original. You may also see entries marked as stored, where the compressed size is identical to the uncompressed one because no compression was applied at all, either by choice or because the program judged it pointless.

Why it matters

This is the number that counts in the real world. It is what an e-mail attachment limit measures, what an upload cap measures, and what the archive costs you on a disk or a memory stick. The uncompressed figure describes a future state; this one describes the file you are holding.

It also explains a disappointment. If the compressed size is barely below the uncompressed size, the content was already compressed before you zipped it, and no compression program can squeeze the same data twice. That is normal, not a fault in the tool and not a setting you have got wrong.

A size on its own reveals nothing personal. There is one thing worth knowing before you share an archive, though: ordinary ZIP password protection hides what is inside the files, not the list of what is there. The names of the members and their sizes stay readable to anyone who opens the archive, even without the password.