What’s The Uncompressed Size Of A File
zip-uncompressed-size
Uncompressed Size is a value you will often find in ZIP files or other archives. Find out what is meant by that and what it tells you about your file.
Uncompressed Size is how big content will be once it is unpacked again: the room the files take up on a disk after extraction, as opposed to the smaller Compressed Size they occupy while they are still inside the archive.
Which files carry it, and where the number comes from
Archives record it. ZIP files do, along with all the everyday formats that are ZIP containers underneath, such as .docx, .xlsx and .pptx documents, .odt files, .epub e-books, .jar and .apk packages. RAR, 7z and other archive formats store the same figure in their own layout.
An archive usually exists to combine several files into one, though a single file can be archived on its own just as well, and the compression program notes the original size of each member as it packs it. That is done automatically by whichever tool made the archive, whether that is 7-Zip, WinRAR, WinZip, the Archive Utility on macOS, the Windows compressed folder command or the zip command line tool.
It is worth understanding that this figure is a declaration. The archive states how big the content ought to be when unpacked; nothing verifies that until you actually extract, at which point the size and the stored checksum are compared against what came out.
What a typical value looks like
A whole number of bytes, which tools often convert to KB or MB for display. The text of a short Word document might read 48219 bytes uncompressed while occupying a small fraction of that inside the .docx file.
Divide the compressed size by this one and you have the compression ratio. How large the gap is depends on the content and on the method used; Deflate is the standard method in ZIP files, with BZIP2 and LZMA among the alternatives. One quirk is worth knowing: the original ZIP fields hold 32 bits and therefore stop at 4,294,967,295 bytes, just under 4 GB. Larger content relies on the ZIP64 extension, which keeps the true figure in an extra record, so a very old tool that does not understand ZIP64 can report a capped or nonsensical number for a huge file.
Why it matters
The most practical use is planning. This is the figure that tells you whether the contents will fit before you unpack them, and the surprise can be considerable, because a modest archive of text or log files can expand into many gigabytes. Comparing it with the compressed size also tells you whether compressing helped at all: two nearly equal numbers mean the content was already compressed, as with JPEG, MP3 and MP4 files, and repacking it will save nothing.
It doubles as a sanity check. An archive of a few hundred kilobytes that declares an enormous uncompressed size deserves caution, because deliberately crafted archives use exactly that trick to fill up a disk when someone unpacks them. For archival work the comparison runs the other way: checking the declared size against what actually came out is a simple way to confirm that an old archive is still complete.
The figure carries no personal information. It describes the volume of data and nothing about the person who created it.