What is a ZIP file?
A plain-English explanation of the ZIP format: containers, compression methods, and why ZIPs sometimes do not shrink.
A ZIP file is a single file that holds other files and folders inside it, like a box with organized drawers. The contents can be compressed to take less space, and the whole box can be moved, emailed, or stored as one unit.
What does a ZIP file actually do?
A ZIP archive does two jobs. First, it bundles: many files and folders become one file, which makes them easy to share. Second, it can compress: repeated patterns in the data are encoded more efficiently, so the archive is smaller than the sum of its parts.
How ZIP compression works
Most ZIP files use a compression method called DEFLATE. It finds repeated sequences of bytes and references earlier occurrences instead of writing them again, then assigns shorter codes to the most frequent symbols.
Why some files do not shrink
Many common formats are already compressed internally:
- JPEG, PNG, and WebP images
- MP4, MP3, and other media
- PDF documents with embedded images
- DOCX, XLSX, and PPTX files (which are themselves ZIP archives)
- Existing ZIP files
Recompressing these is like wrapping a sealed package: it adds a little overhead and rarely saves anything.
Inside a ZIP file
A ZIP archive is a sequence of entries. Each entry has a local header, the compressed data, and a record in the central directory at the end of the file. The central directory lists every entry with its name, size, compression method, timestamps, and a CRC-32 checksum used to verify data integrity.
Store vs compress
ZIP files can store entries without any compression at all, called store mode. It takes just as much space as the original files, but the files are still bundled into one archive, which avoids wasting time on already-compressed data.
Frequently asked questions
Are ZIP and ZIPX the same thing?
No. ZIPX is an extension that allows newer compression methods such as LZMA, PPMd, and BZip2. Standard ZIP tools may not open ZIPX files.
Can a ZIP file contain anything?
Yes, ZIP is a container. It can hold documents, images, executables, or scripts, so treat ZIP files from unknown sources with caution.