Every File Compression System Explained

Computer Science
96 followers
16 Video Views·Apr 9, 2026
Compression systems are what make large files smaller, faster to share, and easier to store—but not all formats work the same. In this video, we break down the most common compression systems used across Windows and Linux, including ZIP, RAR, and 7-Zip on Windows, along with Gzip, Bzip2, and tar on Linux.
We’ll explain how each format works, what algorithms they use, and why some are better for speed while others focus on maximum compression. By the end, you’ll understand when to use each tool and what’s actually happening behind the scenes when your files get compressed.
A file compression system is a method used to reduce the size of data,
so it takes less storage space and can be transferred faster.
Instead of storing data exactly as-is, compression systems find patterns and bits,
and encode them more efficiently.
There are many different formats used for data compression,
and to access these compressed files,
you usually need special softwares called archive managers or compression utilities.
The best thing about compression systems is that when you extract the data,
it comes back exactly the same as it was before compression.
Zip file system is a lossless compression system, created in 1989 by Phil Katz.
It is one of the oldest and most widely used compression format,
mainly because it is built into almost every operating system,
including Windows, macOS, and Linux.
Zip mainly uses the Deflate algorithm to compress data,
which is a combination of two algorithms named LZ77 and Hoffman Coding.
Let's say a document has word LOL five times in it,
and each character of this word takes up one byte of storage,
so total storage occupied by this repeating word will be 15 bytes.
But Zip file will scan the document and store it as LOL times 5,
which takes only 5 bytes of storage space,
significantly lower than the uncompressed 15 bytes.
Moreover, it can scan an entire document,
detect repeating patterns of words and lines,
and assign them shorter codes.
That is why a 200 megabyte text folder can be reduced
to around 30 to 40 megabytes after Zip compression.
Zip can compress any type of file, but it works best with text.
For example, if you compress a 400 megabyte MP4 file,
it may only shrink to about 385 megabytes,
which is not very efficient because video and image files are usually already compressed.
It can simultaneously compress multiple files and combine them into one archive,
but Zip files cannot be password protected by default.
WinRAR, developed in 1993 by Eugene Rochelle.
WinRAR is one of the most popular compression system.
Unlike Zip, it is not bundled with operating systems.
However, it is very popular because it often achieves better compression
and offers more advanced features.
RAR uses an evolved version of LZ77 algorithm called LZSS.
In simple terms, it not only finds repeating patterns,
but also predicts upcoming data more intelligently to compress it further.
Let's take the same example.
If a document contains the word LOL five times, the total size would be 15 bytes.
Like Zip, RAR will detect this repetition and store it in a shorter form such as
LOL times five, reducing the space significantly.
However, RAR goes a step further.
It can analyze larger chunks of data, find more complex patterns,
and compress them more efficiently,
reducing the size of a 200 megabyte text folder to just 20 megabytes.
RAR can compress any type of file.
It supports built-in password protection,
error recovery, and the ability to split large archives into smaller parts.
However, it's a paid program and just like Zip, it can't compress videos and images very well.
7Z
7Z is a modern compression format introduced in 1999 with the 7Zip software.
It was designed to achieve much higher compression than older formats like Zip and RAR.
It can perform all the functions offered by both Zip and WinRAR.
But its main strength is maximum compression.
It uses advanced algorithms like LZMA.
When a file is compressed, 7Z creates a large dictionary of patterns.
When pattern appears again in the file, instead of writing it again,
7Z stores a reference to that pattern.
Best part of 7Z is that it's open source and totally free.
File size is also smaller than RAR and Zip systems.
However, 7Z is resource hungry and may take more time to successfully compress a file.
TAR
TAR stands for Tape Archive and was originally developed in the 1970s for UNIX systems.
It was designed to bundle multiple files into a single package
while preserving their structure and permissions.
It can perform file packaging like Zip or RAR, but it does not compress data on its own.
Its main strength is organization.
TAR simply groups files together, making it easy to move or manage large collections.
To actually reduce size, it is combined with tools like gZip or XZ.
gZip was introduced in early 90s and is widely used in UNIX and Linux systems.
It can only compress one file at a time,
and to put it into an archive you need to use it alongside TAR.
Which mean gZip will reduce the file size and TAR will combine many of such files in one archive.
It is primarily accessed through command line tools
and is considered a standard compression method within Linux systems.
Its main strength is speed and efficiency.
gZip uses the Deflate algorithm,
which provides a good balance between compression speed and file size.
In best case scenario, a 1GB file like HTML, CSS and JavaScript
can often shrink to around just 40 to 80MB.
Although gZip is free and comes bundled with Linux OS, it cannot encrypt files on its own.
bZip2
Introduced in mid 90s, it was designed to provide better compression
than gZip for UNIX and Linux based systems.
Its main strength is higher compression.
bZip2 uses the Burrows-Wheeler transform,
which reorganizes data to make it more compressible.
Although it is slower than gZip, but it includes everything that gZip offers.
Because of this, it is useful when saving space is more important than speed.
However, it is less commonly used today compared to newer formats like XZ.
XZ is a relatively modern compression format introduced in the late 2000s,
designed to provide very high compression efficiency, even better than bZip2.
Like other formats, it uses lossless compression.
It uses the LZMA2 algorithm, which can detect very deep patterns in data.
A file compressed in XZ format will be 15% smaller than the same file compressed with bZip2.
However, this comes at a cost.
XZ is slower and uses more system resources, especially memory.
Because of this, it is best used for long-term storage or software distribution,
where smaller size is more important than speed.
ZStandard, also known as ZSTD, is a modern compression format developed by Facebook in 2016.
It was designed to provide both high compression and very fast speeds.
Its main strength is balance.
Unlike 7Z or XZ, which focus on maximum compression but are slow,
ZStandard achieves good compression while being extremely fast in both compression and decompression.
ZStandard is widely used in modern systems,
databases, and even operating systems where speed and efficiency are both important.
However, it is not as commonly used for everyday file sharing,
so support may be limited compared to ZIP or RAR.
ISO is not a traditional compression format,
but a disk image format used to store an exact copy of a CD, DVD, or entire file system.
It was designed to preserve the full structure of a disk,
including files, folders, and boot information, all in a single file.
Unlike ZIP or RAR, ISO does not compress data by default.
Its main strength is accuracy.
It creates an exact replica, which makes it ideal for software distribution,
operating systems, and backups.
However, because it does not reduce file size, it is not suitable when compression is needed.
In many cases, a single archive manager can support multiple formats,
which is why you can open ZIP or 7Z files using the same software.
Also, some formats are more common depending on the platform.
And of course, there are many other compression formats out there,
some older, some less widely used.
But these are the ones that are most relevant today,
and the ones you're most likely to encounter in real-world use.
