File compression shrinks the size of files and folders by removing redundant data
When you compress a file, software looks for patterns and repetition in the data and stores them more efficiently. A photo file might contain the same shade of blue repeated across a large area of sky — compression notes that pattern once instead of recording it hundreds of times. A text document with the word "the" appearing thousands of times gets stored as a reference to "the" plus a count, rather than the full word each time. The file becomes smaller without losing any of the actual information.
The compressed file is useless on its own. You cannot open a compressed photo or read a compressed document directly. You have to decompress it first — extract the original file back to its full size — before you can use it. This is why compression is most useful when you are moving files around: sending them by email, uploading them to cloud storage, or backing them up to an external drive.
Key Takeaways
- Compression reduces file size by finding and removing redundant data, but the file must be decompressed before you can use it.
- Some file types compress well (documents, images, video) while others compress poorly (audio files, PDFs, files already compressed).
- Lossless compression keeps every bit of the original data intact; lossy compression discards some data permanently to achieve smaller sizes.
- Common compression tools on Windows include the built-in zip feature; on Mac, the Archive Utility does the same work automatically.
- A compressed folder containing multiple files is called an archive, and it acts as a single package that you can move, share, or store as one unit.
Lossless compression keeps all the original data
Lossless compression is the type you use when you cannot afford to lose any information. It works by finding patterns and redundancy in the file and encoding them more efficiently, but it never throws away actual data. When you decompress the file, you get back exactly what you started with, byte for byte.
This is what the zip format does. It is the standard compression method for documents, spreadsheets, text files, and any file where accuracy matters. If you compress a Word document or a spreadsheet, decompress it later, and open it, the content will be identical to the original. Lossless compression is also used for PNG images, which is why photographers and designers often use PNG instead of other formats when they need to preserve every detail.
Lossy compression discards data to achieve smaller file sizes
Lossy compression permanently removes some of the original data to make the file much smaller. The removed data is chosen to be the least noticeable to human eyes or ears — usually fine details, subtle color gradations, or high frequencies in sound that most people cannot hear anyway. When you decompress a lossy file, you do not get back what you started with. You get back a version that is close enough for most purposes, but not identical.
JPEG images use lossy compression. A photograph compressed as a JPEG is noticeably smaller than the same photo saved as a PNG, but if you look closely you may see blurring around edges or color banding in gradients. MP3 audio files use lossy compression too — they are much smaller than uncompressed audio, but an audiophile with good equipment might hear the difference. Lossy compression is useful when file size matters more than perfect accuracy, such as sharing photos on social media or streaming video over the internet.
Some file types compress better than others
Text-based files compress extremely well. A Word document, a spreadsheet, or a plain text file might shrink to 10 or 20 percent of its original size when compressed, because text has a lot of repetition and pattern. The same applies to many image formats: a PNG file can often be compressed to 50 to 70 percent of its original size.
Other file types barely compress at all. MP3 files, JPEG images, and video files like MP4 are already compressed using lossy methods, so running them through zip compression again yields almost no reduction. A folder containing mostly MP3s might shrink by only 5 percent even after compression. PDF files vary — a PDF that is mostly text compresses reasonably well, but a PDF full of images compresses poorly. If you are trying to save space, compressing files that are already compressed is usually not worth the effort.
Archives bundle multiple files into a single compressed package
When you compress a folder containing many files, you create an archive — a single file that holds all the originals in compressed form. An archive acts as a container. Instead of emailing ten separate files, you email one archive. Instead of uploading twenty documents to cloud storage individually, you upload one archive and decompress it on the other end.
Archives are also useful for organization. If you have a project folder with documents, images, spreadsheets, and notes scattered across subfolders, you can compress the entire folder into a single archive file. That archive preserves the folder structure inside it, so when someone decompresses it, they get back all the original folders and files in the same arrangement. This is much easier than trying to manually organize and send dozens of separate files.
Compression does not damage files if you use the right method
A common worry is that compression will corrupt or damage files. This is not how lossless compression works. Lossless compression is mathematically reversible — the decompression process is designed to restore the exact original file. If the compressed file is not corrupted, the decompressed file will be identical to what you started with.
The only way compression damages files is if the compressed file itself becomes corrupted during transfer or storage, or if you use the wrong tool to decompress it. If you compress a file with Windows zip and decompress it with Windows zip, you get back the original. If you compress with one tool and decompress with an incompatible tool, you might get errors. Stick to standard formats like zip, and use the built-in tools on your operating system, and you will not run into problems.
Compressed files take up less space but require decompression before use
The trade-off with compression is straightforward: smaller file size in exchange for an extra step. You cannot use a compressed file directly. You have to decompress it first, which takes a few seconds on a modern computer. For files you move once and then use, this is a worthwhile trade. For files you access constantly, compression adds friction.
Cloud storage services like Google Drive and Dropbox do not compress files automatically, so if you want to save space you have to compress manually before uploading. External hard drives and USB drives have plenty of space, so compression is less necessary unless you are trying to fit a very large project onto a small drive. Email has size limits — Gmail allows up to 25 MB per message — so compressing large attachments before sending is often the only way to send them at all.
Frequently Asked Questions
Can I compress a file that is already compressed?
Yes, but it usually does not help. Files like MP3, JPEG, and MP4 are already compressed using lossy methods, so running them through zip compression again typically reduces the size by only a few percent. Text files and uncompressed images compress much better.
Will I lose quality if I compress a photo?
Not if you use lossless compression like zip. The photo will be smaller, but when you decompress it, it will be identical to the original. If you save a photo as JPEG instead of PNG, that is lossy compression and you will lose some detail — but that happens at the JPEG stage, not during zip compression.
What happens if a compressed file gets corrupted?
A corrupted compressed file cannot be decompressed. You will get an error message when you try to open it. This is why it is important to keep backups of important files, and to verify that a compressed file transferred successfully before you delete the original.
Do I need special software to compress files?
No. Windows has a built-in zip feature, and Mac has Archive Utility built in. You can right-click a file or folder and compress it without installing anything. Third-party tools like 7-Zip or WinRAR offer more options, but the built-in tools are sufficient for most people.
How much smaller will my files be after compression?
It depends on the file type. Text documents and uncompressed images might shrink to 20 to 50 percent of their original size. Photos already saved as JPEG, audio files, and video files might shrink by only 5 to 10 percent because they are already compressed.