File Compression Formats Explained — ZIP, RAR, 7Z, GZIP, TAR & More
File compression reduces storage space and makes transfers faster by encoding data more efficiently. But the landscape of compression formats is cluttered — ZIP, RAR, 7Z, GZIP, TAR, BZIP2, XZ, ZSTD, and more. Each uses different algorithms with different trade-offs between compression ratio, speed, and compatibility. This guide explains how compression works, compares every major format, and tells you which one to use for your specific situation.
How File Compression Works
Compression algorithms find and eliminate redundancy in data. If a file contains the phrase "the quick brown fox" repeated 500 times, a compressor replaces all 500 occurrences with a short reference to a single stored copy. Text files, source code, and spreadsheets compress extremely well (60-90% reduction) because they contain heavy repetition. Photos, videos, and music files are already compressed and shrink very little (0-10%) when compressed again.
There are two categories of compression. Lossless compression (what ZIP, RAR, 7Z all do) preserves data perfectly — the decompressed file is bit-for-bit identical to the original. Lossy compression (what JPEG does for images, MP3 for audio) discards data permanently for much higher compression ratios. Archive formats like ZIP always use lossless compression.
ZIP — The Universal Default
ZIP has been the default archive format since 1989. Windows, macOS, Linux, Android, and iOS all open ZIP files natively without installing anything. That universal support is ZIP's greatest strength and the reason it remains dominant despite technically inferior compression. ZIP uses the Deflate algorithm by default, though modern implementations support better algorithms like Deflate64 and LZMA.
ZIP archives also let you extract individual files without decompressing the entire archive — each file is compressed independently. This is convenient but costs compression ratio, because the algorithm cannot find redundancy across files. Use ZIP when sharing files with others, sending email attachments, or creating archives that must work on any system.
7Z — Maximum Compression Ratio
7Z uses the LZMA2 algorithm and delivers significantly better compression than ZIP — typically 30-70% smaller archives for the same source files. It also supports solid compression, where multiple files are compressed together as a single stream, allowing the algorithm to find redundancy across the entire archive. This produces even smaller files but means you must decompress the whole archive to extract any single file.
7Z is completely free and open-source (7-Zip on Windows, p7zip on Linux, Keka on Mac). The drawback is that 7Z is not natively supported by any major operating system — recipients need to install a tool to open it. Use 7Z for personal backups, archiving large collections, and situations where you control both the creation and extraction.
RAR — Declining but Still Common
RAR compresses about 10-30% better than ZIP and offers features like multi-volume archives (splitting a large archive across multiple files) and recovery records (repairing corrupted archives). RAR was widely popular in the 2000s for distributing large files on the internet. Today it is declining because 7Z offers better compression with no licensing restrictions, while ZIP offers better compatibility.
RAR is proprietary — the WinRAR application technically requires a paid licence (though it famously never enforces this). If someone sends you a RAR file, extract it online or use 7-Zip. There is rarely a reason to create new RAR archives.
TAR, GZIP, BZIP2, XZ — The Unix Family
The Unix world separates archiving (bundling files) from compression (shrinking them). TAR bundles files into a single archive while preserving Unix permissions and metadata, but applies no compression. TAR is then combined with a compression algorithm: GZIP (.tar.gz) is the fastest and most common. BZIP2 (.tar.bz2) compresses better but slower. XZ (.tar.xz) compresses best of all, comparable to 7Z.
You will encounter .tar.gz files when downloading open-source software, working with Linux servers, or managing Docker images. For everyday use on Windows or Mac, convert to ZIP for easier handling.
ZSTD — The Modern Contender
Zstandard (ZSTD), developed by Facebook, is the newest major compression algorithm. It delivers compression ratios close to LZMA/7Z while being dramatically faster — near-GZIP speeds with near-7Z results. ZSTD is rapidly being adopted in databases, package managers, and backup systems. It is not yet a common end-user format, but it is increasingly the compression layer behind the tools people use every day.
Compression Comparison — Real Numbers
1 GB of mixed office files (documents, spreadsheets, presentations): ZIP → ~200 MB | RAR → ~170 MB | 7Z → ~140 MB. Compression speed (same files): ZIP is fastest, 7Z is slowest (by 3-5x). Decompression speed: All formats decompress much faster than they compress — 7Z decompression is only slightly slower than ZIP. Already-compressed files (JPEG photos, MP4 videos): All formats produce nearly identical results (1-5% reduction) because there is no redundancy left to exploit.
Which Format to Use
Sharing with anyone: ZIP — zero compatibility risk. Personal backups and archives: 7Z — best compression, saves storage. Linux/server work: .tar.gz or .tar.xz — the standard in that ecosystem. Large archives you need to split: 7Z or RAR — both handle multi-volume splitting well. Maximum speed: ZIP or .tar.gz (GZIP) — fastest compression and decompression.
Convert Archive Files
Convert between ZIP, RAR, 7Z, TAR, and more — free, in your browser.