Skip to content
FRK Yazılım
Technology

How Does File Compression Work? ZIP, RAR and 7z Compared

Behind the compression we use every day to bundle a folder into one smaller file is a clever idea.

File compression means re-encoding data so it takes up less space. It is used both to bundle many files into a single archive and to make files smaller for email and uploads.

How does it work?

Compression finds repetition in data and writes it more briefly, like writing “10×A” instead of “AAAAAAAAAA”. Real algorithms find much more complex patterns, but the idea is the same. Archives such as ZIP use lossless compression: when you extract them, the files come back exactly, bit for bit.

Which files shrink, and by how much?

  • Shrink a lot: text, documents, spreadsheets, source code, uncompressed images (BMP, TIFF).
  • Shrink little or not at all: JPG, MP4, MP3, PNG and already compressed PDFs. These formats are compressed internally, so compressing them again barely changes their size.

ZIP, RAR and 7z

FormatNotes
ZIPThe most common format. Windows and macOS open and create it without extra software.
RARGood compression and error recovery. Creating it usually needs WinRAR.
7zThe format of the open source 7-Zip program. Often achieves high compression.

For files you share, ZIP is the safest choice because the other person does not need to install anything.

Creating a ZIP in Windows

Select files or folders, right-click and choose Compress to → ZIP file. To open one, right-click the ZIP file and choose Extract all. Recent Windows versions can also open other archive formats such as 7z and RAR.

Security: Be careful with unexpected ZIP files arriving by email. Malware is often sent inside archives; password-protected archives in particular can be used to slip past antivirus scans.

Password-protected archives

The 7z and RAR formats support encrypting the archive with strong encryption (AES-256). You can use this when sharing sensitive files; send the password through a different channel, not in the same message as the file.

Frequently asked questions

Why doesn’t a video get smaller when I zip it?

Because video formats like MP4 are already compressed. To shrink a video, you need to re-encode it at a lower resolution or bit rate.

Can a damaged archive be recovered?

Sometimes. RAR’s recovery record feature can help; with other formats the chances are lower.

Related articles

Technology

How Should You Back Up Your Files? The 3-2-1 Backup Rule

The 3-2-1 backup rule, external drive and cloud backups, automatic backups and testing your backups, so you never lose photos and documents.

Technology

Is Your Wi-Fi Slow? 9 Ways to Speed Up Your Home Internet

Common reasons home internet slows down and fixes you can try yourself, such as router placement, frequency band and channel choice.

Technology

What Is a Website Made Of? The Roles of HTML, CSS and JavaScript

The roles of HTML, CSS and JavaScript, the building blocks of web pages, plus server-side software and content management systems like WordPress.