RAR Files
How RAR Compression Actually Works
RAR compression shrinks files by finding and eliminating redundant patterns in the data — how much it helps depends heavily on what kind of file you're compressing.
Get an archive tool for your computer
Download the installer and start opening RAR, ZIP and 7z archives in a few minutes.
Compression works by spotting redundancy — repeated patterns, predictable structures, or byte sequences that appear more often than random chance would suggest — and re-encoding the data more compactly. RAR, like most general-purpose compressors, does this without any special knowledge of what the file actually represents; it just looks at the bytes.
Dictionary and sliding window matching
As RAR compresses data, it keeps a "dictionary" — a window of recently processed data — and looks for matches between what it's currently compressing and what it has already seen. When it finds a repeated sequence, it can replace the repeat with a short reference back to the earlier occurrence instead of storing the bytes again. A larger dictionary window can catch matches that are further apart in the file, which is why dictionary size is a configurable setting.
Solid compression
By default, or as an option, RAR can treat multiple files as one continuous stream for compression purposes — a "solid" archive. This helps when you have many small, similar files, because patterns found in one file can be reused when compressing the next. The trade-off is that extracting a single file from deep inside a solid archive can require decompressing some of the preceding data too.
Why some files barely shrink
Compression only helps where redundancy exists. Formats like JPEG images, MP4 video, and MP3 audio are already compressed by their own format, which means most of the redundancy in that data has already been squeezed out. Running RAR compression over an already-compressed file typically yields little to no additional size reduction, and in rare cases can even add a small amount of overhead.
| File type | Typical compressibility |
|---|---|
| Plain text, source code, logs | Compresses well — often noticeably smaller |
| Office documents, uncompressed spreadsheets | Compresses moderately well |
| Already-compressed images (JPEG), video (MP4), audio (MP3) | Compresses very little, if at all |
| Uncompressed images (BMP, RAW) or audio (WAV) | Compresses well, since the redundancy hasn't been removed yet |
| Encrypted or random-looking data | Compresses poorly to not at all, by design |
Compression level trade-offs
- Higher compression settings generally produce smaller archives but take longer to create and use more memory.
- Lower or "fastest" settings finish quickly but leave the archive larger.
- For files that don't compress well anyway (like video), a lower setting saves time without meaningfully affecting the final size.
- "Store" mode skips compression entirely and just bundles files, which is fastest when you only need a single-file container, not smaller size.
For the surrounding format details, including solid archives and dictionary size settings, see RAR file format. For a general overview of compression concepts beyond RAR specifically, see what is file compression.
Download and try it yourself
Install the archive tool and apply the steps from this guide on your own files.
Frequently asked questions
Why is my compressed RAR archive almost the same size as the original files?
The original files are probably already compressed formats, like JPEG or MP4, which leaves little redundancy for RAR to remove.
Does a higher compression level always produce a smaller file?
Usually, but the difference can be small for data that doesn't compress well, and higher levels always take more time and memory.
What is a solid archive?
It's an archive where all files are compressed together as one continuous stream rather than individually, which can improve compression on many similar small files. See [RAR file format](/rar-file-format).
Related guides
- The RAR File Format ExplainedRAR is a proprietary archive format with its own header structure, versioning, and optional features like solid compression and recovery records.
- What Is File Compression?File compression shrinks data by removing redundancy. How much it shrinks, and whether anything is lost, depends on the method used.
- How to Compress FilesCompressing files well means picking the right format and settings for what you're compressing, not just clicking the highest setting available.
- WinRAR vs 7-ZipWinRAR and 7-Zip are the two archive tools people ask about most on Windows. Here is how they actually differ, feature by feature.
WinRAR is a trademark of its respective owner. RareExplorer is an independent resource and is not affiliated with or endorsed by RARLAB or win.rar GmbH. Read our editorial policy to see how this page was researched.