How does file compression work

So, I realised today I take file compression for granted. The ability to bundle a few files together into one, and have it come out smaller than any of them, is something I just accept as a fact, but how does it actually work?

I have a limited knowledge of it that includes something to do with replacing all the duplicate entries with pointers, to shrink that way, but beyond that I’m fairly clueless!

As I’m always open to new knowledge, as I imagine most of us here are, I thought I’d ask. So, SuperUser, how does compression actually work?

How does file compression work

2 Answers 2

Lossless Compression

Lossless compression is where no data is lost. Everything that is entered can be retrieved perfectly. This works well for text or binary files where the smallest error will be noticed.

File compression works by taking the file and scanning for patterns, and translating those patterns into something else which takes up less space.

For example “AAAAAAAA” could be turned into “8A”.

Granted that’s not how it works exactly because then you have the problem what if “8A” was in the plaintext. You would uncompress the file and it would be wrong. A good place to start is either Wikipedia or the LZW Data Compression Algorithm.

There is some simply psuedo-code for this copied below:

All compression uses a lookup dictionary which is used to compress and decompress the file. The bigger the dictionary, the more you can compress it, although you do run into the Law of Diminishing Returns.

It’s also worth noting that compression doesn’t always yield a smaller file. There are situations (with small files, or when compressing random data) that you will not get a smaller file after compression. There have been some fun challenges pertaining to the ability to compress random data.

“Lossy” Compression

The above mostly pertains to lossless compression. Other types of compression used in video / audio applications such as MP3, JPG, and h.264 are examples lossy compression.

Lossy compression works by discarding data that is least likely to be noticed. In audio this is sounds about 30,000 Hrz and below 100 Hrz, along with other various things. In picture (static) it removes various things and merges pixles together, along with discarding data.

Lossy compression is a form of transform coding. It averages out data to reduce the overall size. For example a block of 10 pixels in an image, all of slightly different colors may be merged together to one color and thus compressed.

In video compression often instructions will be placed to only redraw pixels that have changed since the last frame, or keyframe.

How file compression and file archiving work

What is file archiving

What is file compression

File compression means to reduce size of data on disk encoding it to a smaller output , employing various strategies to efficiently map (most cases of) a larger input to a smaller output, i.e. using statistical analisys to reduce redundancy in inputa data.
Data compression, too, predates development of ZIP standard, as once the input files were merged into a single output archive, the operation was often concatenated to lossless data compression to reduce the size of the archive using various utilities available at the time as SQ (DOS, CP/M), CRUNCH (CP/M), and compress (Unix).
TAR format, for example, is still an uncompressed archive standard, and uses external compressors, nowadays usually GZ (fast deflate based compression, same as in ZIP format), BZ2 (more powerful compression), XZ (modern, very powerful LZMA based compression – the default compression algorithm used in 7Z format), BR Google’s Brotli (modern, very fast compressor), and ZST Facebook’s Zstandard (another modern, very fast compressor).

Learn more about similarities and differences in Lossy and lossless data compression paragraph. For general purpose compressed archive file, however, compression means Lossless Compression, a 1:1 mapping of input to a smaller output.

SEA’s ARC format (1985) combined the archival and (lossless) compression in a single pass, providing probably the first example of general purpose of archive manager, which allowed both to spare storage for backup, and save upload and download bandwidth (and time) for sharing – at the time, mainly BBS.
A few years later, after a controversy with SEA about alleged derived work in PKARC, Phil Katz superseded previous works releasing PKZIP, which knew great success due multiple factors, as superior speed and efficiency, and being the specs released under public domain, and having relatively few competitors in years of fast PC market expansion.

Lossy and lossless data compression definition

How lossy and lossless compression works

Data compression can be defined lossy or lossless , in terms of reversibility of the compression process due loss (or preservation) of original information in the process. The two types of algorithms have different pros and cons, and different field of application.

Lossless compression definition, file archiving

Lossless compression uses statistical models to map the input to a smaller output eliminating redundancy in the data.
In this way the output carry exactly all the information featured by the input in less bytes, and can be expanded when needed to a 1:1 copy of the original data (restoring exactly the original content), which is a fundamental property for storing some types of data – i.e. a software, a database.

Lossy compression definition, multimedia data compression

Lossy compression, instead, works identifying unnecessary or less relevant information (not just redundant data) and removing it.

Unlike the lossless compression, the amount of information to compress is effectively reduced.
The loss of information / content is irreversible, and depending from the nature of the algorithm, will likely happen each time the content is modified and saved to a lossy file format – e.g. when editing a lossy jpeg images, and saving it multiple times to intermediate work files.

In this way data compression ratio is improved but at the cost of making lossy compression a non reversible process – as it comes at the cost of losing part of the information – and making it a suitable choice only when it is not intended, by design, to restore the original content again.

Due the lossy nature of those compression schemes, however, usually professional editing work is performed on non compressed data (i.e. WAV audio, or TIFF images) or data compressed in a lossless way (i.e. FLAC audio, or PNG images) every time it is feasible so saving the work in progress multiple times does not result in losing bits of the information each time, with progressive degradation of quality – usually reserving use of lossy compression to final step for creating a reasonably sized output to distribute for media consumption.

Lossy vs lossless compression

Lossy and lossless compression algorithms are so different in scopes that cannot be really put in direct competition.
When original content needs to be restored completely on decompression (binary files, rew data) lossless, fully reversible compression is the only option, while when some degree of data loss is acceptable (e.g. finalizing work on multimedia files such as mp3 audio, mpeg video, jpeg graphics) generally advantages of lossy compression in terms of speed and maximum compression ratio over lossless compression are so evident that lossy, non reversible compression is the only viable choice to meet size and/or performances constrains.

Read lossless compression and lossy compression definitions on Wikipedia.

What are compressed archive files

What is a ZIP file

ZIP format is a lossless data compression and archival format created in 1989 by Phil Katz, implemented for the first time in PKWARE’s PKZIP.
The ZIP file format specifications were released under public domain and the format had long and lasting success, to the point often “zip” is colloquially used for any generic compressed archive, and many package formats are based on deflate compression and/or same or very similar specs: Java JAR / WAR / EAR, Android APK, Apple iOS IPA files (iPhone and iPad devices), Microsoft CAB and Office compound files.
WinZip 12.1 (2009) introduced the new ZIPX file format specifications for identifying a new archive standard which supports newer and more powerful compression algorithms.

What are RAR, ACE, 7Z files

Synopsis : What is an archive file? What is a compressed file? What is a zip file? How lossy compression and lossless data compression works. What are non reversible and reversible algorithms advantages and disadvantages. Compare definitions, and compressed file types. Lossy vs lossless compression. How 7Z, RAR, ZIP files work? How does file compression works? How does file archiving works? What does file archiving and file compression mean?

Topics: how data compression works, lossy and lossless compression, what is an archive file, what is a zip or a rar file

PeaZip > FAQ > How file compression works, what are archive files

What is Data Compression and How Does it Work?

How does file compression work

DataProt is an independent review site dedicated to providing accurate information about various cybersecurity products.

DataProt remains financially sustainable by participating in a series of affiliate partnerships – it is visitors’ clicks on links that cover the expenses of running this site. Our website also includes reviews of products or services for which we do not receive monetary compensation.

DataProt’s in-house writing team writes all the site’s content after in-depth research, and advertisers have no control over the personal opinions expressed by team members, whose job is to stay faithful to the truth and remain objective.

Some pages may include user-generated content in the comment section. The opinions expressed in the comment section do not reflect those of DataProt.

Have you ever needed to send a few hundred photos from your vacation by packing them into an archive? Maybe you remember ripping your CDs into MP3s in the days when the iPod was still a brand new gadget. Whatever the case may be, you probably remember how the resulting archive ended up being significantly smaller than what you’ve started with. That’s because you compressed those files.

Data compression is almost as old as computers are. It’s one of those innovations that really changed how we interact with media. We wouldn’t be able to stream Netflix through a VPN, quickly send pictures to our friends, or even backup music onto our smartphones without it. If you’ve ever wondered how it all works under the hood, this is the article for you.

How Data Compression Works

For the uninitiated, compression looks like some sort of wizardry. You just press a few buttons, and voila – you have a .zip or .rar file that’s significantly smaller than the file(s) you started with. How does the computer “know” how to pack all that data up without damaging anything?

That’s where algorithms come into play. Every data compression technique has a particular set of rules. For example, when text compression is initiated, the computer will take all of the gaps in the text and assign them a single byte. After that, it will pack the byte into a string that tells the decoder where to put everything back.

Image compression works similarly. Depending on the algorithm, you may get a smaller file with visibly inferior image quality or something that’s almost the same size and looks pretty much identical to the original.

Compression works by either removing unnecessary data or gathering the same or similar bytes and giving them a new value, thus allowing the computer to reconstruct the original data.

Data Compression Types

Two main types of compression are called lossy and lossless since one is smaller but compromises image or sound quality, while the other tends to be larger but keeps the file quality intact.

Lossy compression produces smaller files by analyzing the original data and removing unnecessary bits. That can be adjacent pixels of similar color or unused frequencies in a song. When executed well, lossy compression produces good results that are very close to the original work.

However, making the compression algorithm more aggressive causes significant data loss in the final product – a photo can look pixelated, you’ll hear songs missing certain sounds, and videos will become a blocky mess.

Lossless data compression produces much better results if you’re willing to sacrifice storage space. It’s also non-destructive in its process. Instead of outright removing same-value bytes, the algorithm counts them and replaces the block with a byte signifying the number of replaced blocks. The idea is to preserve the structure of the original file(s).

This is how most archiving tools and formats work, which is why you get the original files when you unpack archives created this way. Lossless compression is used in situations where lossy compression would cause irreparable damage to files, such as executables. It is also popular with audiophiles looking to preserve the quality of their music recordings.

How does file compression work

Common Data Compression Algorithms and Their Uses

Over the past several decades, computer scientists have been developing and perfecting different algorithms for data compression. Today, many different algorithms are in use, with some being more effective for video and others for images. Here are some of the most common ones:

  • LZ77 – Released in 1977, uses triples to represent offset, the number of characters in a phrase, and markers for deviating characters.
  • LZSS – An improvement over the LZ77, using only pairs without deviations. Used by the .rar compression format and for compressing network information.
  • DEFLATE – A data compression method combining the previous two methods with codes assigned based on character frequency.
  • LZMA – Uses LZ77 on bit level and then further compresses data through arithmetic coding. Most commonly used by 7-Zip. The format was upgraded to LZMA2 in 2009.
  • MLP – One of the first neural networks, MLP uses a combination of binary coding, quantization, and pixel-by-pixel transformation for creating output data.
  • RLE – Lossless compression that stores a single value in count, great for image and animation compression.
  • ZStandard – Another lossless compression. It’s similar to DEFLATE but offers faster decompression and can be paired with a dictionary for even quicker data compression.
  • bzip2 – Based on the Burrows-Wheeler transform block-sorting compression, bzip2 looks for recurring sequences and converts them into identical letter strings. Then, it employs two additional transformations, leading to blocks that are between 100 and 900 KB in size.

Pretty much any image format, whether it be JPG or GIF, is a compressed file. In audio, MP3 is the most well-known file format, but audiophiles prefer FLAC files for that lossless, full quality sound. Of course, online streaming platforms such as YouTube and Netflix all use compressed video for faster transfer to the end-user.

Advantages of Data Compression

The main reason we compress our files is to save on storage space. This, in turn, saves on transfer times, data usage for sending files over the internet, and also hardware, as we don’t need many storage devices for keeping all the data. Compression is also good for backups, and many data loss prevention apps will compress your backups for quicker access later on.

There is one major disadvantage of compression, though: increased requirements for computational power. With how data compression works, access to compressed formats and files can be slower, which can cause stutters on slower machines if done on the fly. It is for this reason that some algorithms and file formats became more popular than others.

  • Open with Desktop
  • View raw
  • Copy raw contents Copy raw contents

Copy raw contents

Copy raw contents

File Compression and Archival

In this section, we will take a look to compress and archive files

  • File Compression and Archival

Viewing file sizes

The du command, which stands for disk usage is a popular command to inspect the size of the file.

du with -sk shows the size of a file or directory in Kilobytes

du with -sh shows the size of a file or directory in human readable format

we can also use long list , ls -lh to print the size of the file.

Let us know take a look at widely used utility called tar

  • tar is used to group multiple files and directories into a single file. Hence it is specially used for archiving data.
  • tar is an abrevation for tape archive .
  • Files created with tar are often called tarballs .

To archive a file or directory. Use tar command followed by -c to create an archive and the -f is used to specify the name of the tar file to be created. These is followed by files or directories to be archive.

The tar command followed by -tf option followed by the tar filename is used to see the contents of the tarball.

The tar command followed by -xf option followed by the tar filename is used to extract the contents from the tarball.

The tar command followed by -zcf option is used to compress the tarball to reduce its size.

Compression is the technique used to reduce the size consumed by a file or a dataset.

  • To reduce the size of a file or directory in the linux file system, there are commands specificly used for compression.
  • Let us now look at the three popular ones

    bzip2 (.bz2 extension)

    gzip (.gz extension)

    xz (.xz extension)

    The space of the compressed files created by these three commands depends on a few factors, such as the type of data being compressed, the other factors that effect the size are the compression algorithm used by these commands and the compression level used.

      The compressed files can be uncompressed by using the below commands

      How does file compression work

      Compressed files need not to be uncompressed everytime

      • Tools such as zcat , bzcat and xzcat allow the compressed files to be read without an uncompress

      How does file compression work

    © 2022 GitHub, Inc.

  • Terms
  • Privacy
  • Security
  • Status
  • Docs
  • Contact GitHub
  • Pricing
  • API
  • Training
  • Blog
  • About

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

How does file compression work

For some reason, you can actually fit 2 million pixels into an image without using 1.97 megabytes of space. I found a sweet 1080p wallpaper (which has roughly 2 million pixels) and downloaded it. Checking the properties, I noticed something strange: It only took up 230 KB of space on my hard drive. Why is that? For someone who doesn’t quite understand image compression, it seems like magic. But once you get to know the subject, you’ll understand how some images are larger than others despite the amount of pixels they occupy on your screen. Time is short, so let’s take a quick dive into the basic principles behind image compression.

Methods, Approaches, Algorithms Galore.

How does file compression work

It’s naive to think that there’s just one way to compress an image. There are different methods, each with a unique approach to a common problem, and each approach being used in different algorithms to reach a similar conclusion. Each algorithm is represented by a file format (PNG, JPG, GIF, etc.). For now, we’re going to talk about the methods that are generally used to compress images, which will explain why some of them take up so much less space.

Lossless Compression

How does file compression work

When you think of the word “lossless” in the context of image compression, you probably think about a method that tries its hardest to preserve quality while still maintaining a relatively small image size. That’s very close to the truth. As a method, lossless compression minimizes distortion as much as possible, preserving image clarity. It does this by building an index of all the pixels and grouping same-colored pixels together. It’s kind of like how file compression works, except we’re dealing with smaller units of data.

DEFLATE is among the most common algorithms for this kind of job. It’s based on two other algorithms (Huffman and LZ77, if you’re a bookworm) and it has a very tried-and-true way of grouping data found within images. Instead of just running through the length of the data and storing multiple instances of a pixel with the same color into a single data unit (known as run-length encoding), it grabs duplicate strings found within the entire code and sets a “pointer” for each duplicate found. Wherever a particular string of data (pixels) is used frequently, it replaces all of those pixels with a weighted symbol that further compresses everything.

Notice how with run-length encoding and DEFLATE, none of the pixels are actually eaten up or forced to change color. Using this method purely results in an image that is identical to the raw original. The only difference between the two lies in how much space is actually taken up on your hard drive!

Lossy Compression

How does file compression work

As the name implies, lossy compression makes an image lose some of its content. When taken too far, it can actually make the image unrecognizable. But lossy doesn’t imply that you’re eliminating pixels. There are actually two algorithms commonly used to compress images this way: transform encoding and chroma subsampling. The former is more common in images and the latter in video.

With transform encoding, an image’s colors are averaged out using a special mathematical formula called discrete cosine transform. The image suffers color loss and may introduce artifacts (weird pixellation at random points of the image) when used excessively. This particular algorithm makes up for its clumsiness with a strong advantage: You can dictate just how much quality you want to remain with the image. With lossless compression, the closest you can come to manipulating quality holistically is by setting the number of colors each image should have.

Chroma subsampling takes another approach. Instead of averaging small blocks of color, which also may affect the brightness of an image, it carefully attempts to keep brightness the same on all areas. This tricks your eyes into not readily noticing any dip in quality. It’s actually great for the compression of animations, which is why it is used more in video streams. That’s not to say that images don’t also use this algorithm.

But wait, there’s more! Google also took a shot at a new lossy algorithm, known as WebP. Instead of averaging color information, it predicts the color of a pixel by looking at the fragments surrounding it. The data that’s actually written into the resulting compressed image is the difference between the predicted color and the actual color. In the end, many of the predictions will be accurate, resulting in a zero. And instead of printing a whole bunch of zeroes, it just compresses all of them into one symbol that represents them. Image accuracy is improved and the compression reduces image size by an average of 25 percent compared to other lossy algorithms, according to Google.

It’s Time For Questions And Discussion!

If you’re new to the world of image files, you’ll probably find at least a little of this information confusing. If you have a question, post it in the comments and we’ll do our best to answer it. Otherwise, you’re welcome to discuss this!

Our latest tutorials delivered straight to your inbox

Zip, protect, share and manage files anywhere with the world’s #1 zip utility.

  • Zip and unzip instantly
  • Manage all your files in one place
  • Share directly to cloud, social media and IM
  • Convert to PDF, add watermarks and resize photos
  • Connect and share on the go with ZipShare

WinZip XP Standard

How does file compression work

Unzip all major formats

With just a click, open all major compression formats, including Zip, Zipx, RAR, 7z, TAR, GZIP, VHD, XZ and more.

How does file compression work

Complete file management

Easily find, open, edit, move and share your files, whether they are on your computer, network or cloud service.

How does file compression work

Protect your privacy

Easily encrypt files as you zip to secure information and data. Create read-only PDFs and add watermarks to deter copying.

How does file compression work

Share anywhere

Easily share large files by email, cloud services, social media and instant messaging. Quickly share links to your cloud files.


ENHANCED! Zip files from any location

Easily find your most-used files and folders on your PC, network and clouds in Frequent Folders, which updates dynamically.

How does file compression work

NEW! Easier unzipping

Use the super picker to to easily unzip locally or to the cloud.

Zip from other applications

WinZip Express lets you use popular WinZip features even when you’re working in other applications. Use it with Explorer, Microsoft Office, your scanner (Pro only), your photos (Pro only) and Microsoft Outlook to zip, encrypt, share and more.* WinZip Express tools now support Office 2016.

Device-friendly interface

Touch support puts the power of WinZip at your fingertips on any touch-enabled device or computer. WinZip is optimized for 2-in-1 computers, switching its layout automatically depending on whether you are using your system in tablet or notebook mode. Auto-hide scroll bars maximize display space on devices.

Unzip anything

Extract content from the industry’s widest selection of compressed file types, including Zip, Zipx, RAR, 7Zip, BZ2, LHA/LZH, VHD/VDMK, XZ and many more. When extracting encrypted files, WinZip auto-wipes all temporarily extracted copies to prevent misuse.

*WinZip Express is not compatible with Windows XP.

What’s New

ENHANCED! Zip files from any location

Easily find your most-used files and folders on your PC, network and clouds in Frequent Folders, which updates dynamically.

NEW! More sharing options

WinZip XP expands its sharing options, so you can share directly to YouTube, along with Facebook, Twitter and LinkedIn. Expanded instant message support means you can share via Twitter IM, and Office 365 groups, in addition to Google Talk/Google+ Hangouts, Yahoo! Messenger and Jabber. Combining WinZip’s legendary compression and encryption with the ease of instant messaging gives you high-speed sharing without compromising security.

NEW! Scan and Share

Quickly turn a photo or document into a share-ready image or PDF with the new WinZip Scan and Share feature. Start your scan right from WinZip. Then WinZip can zip it and save it locally, on the network or on a cloud service. Or share it by email, social media or instant message—encrypt if you wish to protect your scanned information when sharing. Easily share photos, documents, receipts and more. New support for flatbed scanners means you can scan multiple images into a single PDF without using a document feeder.

Pro and Enterprise only

NEW! Snap and Share

Streamline photo sharing by quickly getting photos directly from your camera to share via WinZip.

Pro and Enterprise only

NEW! More robust file management

WinZip XP takes file management further with several new features available via the new WinZip File Management ribbon.

  • Create new folders on your PC, network or cloud service
  • Securely delete files and folders with the new Wipe feature
  • Restore accidentally deleted, copied, moved or renamed files
  • Open a file from the cloud in the correct application, make changes and WinZip will update it on the cloud for you
  • Open and edit a file with the default application—or open a file in an alternate application
  • View property information for files and folders
  • Map a folder or network location to a drive
  • Copy, move, delete and multi-rename files wherever they are
  • Copy a path to the clipboard; copy a cloud link to the clipboard
NEW! Previewer

The Actions Pane now displays thumbnail previews of a selected file in your zip, on the computer or the network—and for any of your cloud services that support thumbnails. Click on the expand icon in the thumbnail to see a larger image in the new Preview Pane. Preview the contents of images and documents, rotate and resize images, save images as your computer background, and share the previewed file by email, IM or social media. (Requires Windows Explorer Preview technology). Now you can scroll through files in the Previewer with the flick of a finger on touch displays.

Pro and Enterprise only

NEW! Job Wizard Super Picker

Now your backups can include files from almost anywhere and now you can simply drag and drop them from Explorer or the WinZip File pane into the Job Wizard for backup. Combine files from your computer folders, the network and cloud services in one backup. Save the resulting zip to the cloud if you wish. Automate back up and distribution by creating a job that gathers files from various cloud services, zips them and distributes the zip via email according to your schedule.

How does the ZIP format work?

In this post we are going to explore LZ77, a lossless data-compression algorithm created by Lempel and Ziv in 1977. This algorithm is widely spread in our current systems since, for instance, ZIP and GZIP are based on LZ77.

LZ77 iterates sequentially through the input string and stores any new match into a search buffer. The process of compression can be divided in 3 steps:

  1. Find the longest match of a string that starts at the current position with a pattern available in the search buffer.
  2. Output a triple (o, l, c) where,
  • o: offset, represents the number of positions that we would need to move backwards in order to find the start of the matching string.
  • l: length, represents the length of the match.
  • c: character, represents the character that is found after the match.
  1. Move the cursor l+1 positions to the right.

Let’s get a deeper insight with an example:

Initially, our search buffer is empty and we start from the left, where we find an ‘a’. Given that there are not any matching patterns in our search buffer, we output the triple (0, 0, a), since we are not moving backwards (o = 0) and there is not a matching pattern in the search buffer (hence “matching” an empty string: l = 0). After this (non-)match, we find the character ‘a’, so c = a. We move l+1 positions to the right and find ourselves in the second position. We’ll be indicating the position of the cursor using the square brackets [].

So far, we do not have any pattern in our search buffer that starts with ‘b’. Therefore, the encoding process is similar to the previous step: (0,0,b). At this point, things start to get interesting:

We’ve previously found an ‘a’ and even ‘ab’, but not ‘abc’ so we need to move 2 positions to the left (o = 2) and read 2 characters (l = 2). The next character that we can find is a ‘c’, therefore the output triple would be (2,2,c). We move our cursor l+1 positions to the right and find ourselves in the character ‘b’.

We’ve already found a ‘b’, even ‘ba’ and even ‘bab’ but not ‘baba’, so we’ll be moving 4 positions to the left (o = 4) and read 3 characters (l = 3). The next character that we can find is an ‘a’, and hence the output triple would be (4,3,a). We move our cursor l+1 positions to the right and find ourselves in the character ‘b’.

We’re almost done! We’ve already seen a ‘b’ and a ba’, but not a ‘baa’. We need to move 2 positions to the left (o = 2) and read 2 characters (l = 2). After this match, we find an ‘a’, so the last output triple would be (2,2,a).

You may have noticed that the time complexity in the compression phase does not seem to be too good considering that, in the worst case, we need to go back to the beginning of the input string to find a matching pattern (if any). This means that, in a 0-index position p, we need to move p positions to the left in the worst case. Thinking of an edge case in which every character of the string is different (and hence we do not take advantage of data compression), we would need to process 0 characters for the first position + 1 for the second + 2 for the third… + n-1 for the last position = n(n-1) / 2 = O(n2) time complexity. This is one of the reasons why it is common to predefine a limit on the size of the search buffer, allowing us to reuse the content of up to, for instance, 6 positions to the left of the cursor. The following example may help you illustrate this concept, where the parentheses indicate the content inside the search buffer.

In this case, we would not find the ‘c’ in the search buffer and, hence, the output triple would be (0,0,c) instead of (7,3,a). However, we would not have to potentially pay the price in every processed character to find a match, in the worst case, at the beginning of the string. All in all, selecting the size of the search buffer becomes a tradeoff between the compression time and the required memory: a small search buffer will generally allow us to complete the compression phase faster, but the resulting encoding will require more memory; on the opposite side, a large search buffer will generally take longer to compress our data, but it will be more effective in terms of memory usage.

It is also common to limit the size of the lookahead buffer, which is the substring that starts at the cursor. Let’s illustrate this concept with an example, where the lookahead buffer is represented between two * symbols.

In this case, we have a search buffer of size 6 and a lookahead buffer of size 4. Given that the content of our lookahead buffer is ‘baba’ and it is contained in the search buffer, the LZ77 encoding at this position would be (6,4,c). Note that, in this example, if our lookahead buffer was bigger, the output triple in this position would be different. For instance, if our lookahead buffer also had a size of 6 it would contain the string ‘babaca’, which is fully contained in the search buffer and, hence, the output triple would be (6,6,a).

It is worth mentioning that this algorithm is also known as the “sliding windows” algorithm, given that both the search buffer and the lookahead buffer get updated as the cursor “slides” through the input text.

Let’s see how LZ77 uses its encoded form to reproduce the original string. LZ77 is categorized as a lossless data-compression algorithm, which means that we should be able to fully recover the original string. It is also worth mentioning that, in the case of LZ77, we cannot start decompressing from a random LZ77 triple: instead, we need to start decompressing from the initial triple. The reason is, simply, that the encoded triples are based on the search buffer.

In order to illustrate the decompression process, let’s attempt to decompress the obtained encoding in the previous section, aiming to obtain the original string. Therefore, our encoding in this example would be the following:

Starting with (0,0,a), we need to move o = 0 positions to the left and read l = 0 characters (that is just an empty string). After that, write c = ‘a’. Hence, the decompressed value of this triple is ‘a’. At this point, our decompression string looks like this:

The next triple that we find is (0,0,b) which means the following: move o = 0 positions to the left and read l = 0 characters (empty string). After that, write c = ‘b’. Hence, the decompressed value of this triple is ‘b’. Our decompression string now looks like this:

The next triple that we find is (2,2,c), which is a bit more interesting. Now it means the following: move o = 2 positions to the left and read l = 2 characters (‘ab’). After that, write c = ‘c’. Hence, the decompressed value of this triple is ‘abc’. Our decompression string now looks like this:

The next triple that we find is (4,3,a), which means the following: move o = 4 positions to the left and read l = 3 characters (‘bab’). After that, write c = ‘a’. Hence, the decompressed value of this triple is ‘baba’. Our decompression string now looks like this:

The last triple that we find is (2,2,a), which means the following: move o = 2 positions to the left and read l = 2 characters (‘ba’). After that, write c = ‘a’. Hence, the decompressed value of this triple is ‘baa’. Our decompression string now looks like this:

If you check the original to-be-compressed string in the previous section, you will see that they are the same!

PDF comes from Portable Document Format and is one of the most popular types of electronic document formats nowadays. The reason behind this popularity stands.

by BOSS Editorial Team | Published: September 18, 2020 | Updated: September 18, 2020 11:57 am

PDF comes from Portable Document Format and is one of the most popular types of electronic document formats nowadays. The reason behind this popularity stands in the fact that you can send a PDF file to anyone, without worrying if they can read it properly (the layout of the page is preserved).

PDF is so wide-spread that you don’t need a special app or piece of software to open it. It’s enough to have a modern browser (such as Mozilla or Chrome). Still, if you want to edit it or make sure you view it the right way , it helps to have a PDF reader installed.

In short, PDF is the one file format we can’t live without nowadays. You’ll work with such files in school (eBooks, school lessons, essays you write), in college, at work (business proposals, blueprints, how-tos), and basically any social situation that requires an electronic document.

Now, given that PDFs are so easy to send back and forth online, you may have to compress some of them. After all, most email clients have a size limit for attachments and the same is valid for messenger apps. Not to mention that compression also helps with storage (especially if you’re using the free Google Drive version)!

As such, today we’ll take a look at the process of compressing a PDF file and how to make sure your files are always in good hands.

Size vs. Quality

The main reason people compress PDF files (or any files for that matter) is to reduce the size and make it easier to send them via email or other online channels. However, you also have to pay attention to quality – not every small PDF file will keep its structure and elements, so it’s best to use a tool that won’t favor size over quality.

As such, you should compress a PDF file with a tool that allows you to choose the type of compression you want. Here are some of the options that matter the most:

  • Compress images as well – when you have a PDF with lots of images, it will get quite big in the end. However, if you want to keep it professional and visually appealing, it’s best to keep the quality of the images intact.
  • How to compress images – some tools allow users to specify just how much compression there should be on the images (high, medium, low, or custom).

How Does Compression Work?

Before you can decide what type of compression you want, it’s important to understand what happens during the process . In short, each compression tool uses a specific algorithm to identify and eliminate redundancies, find patterns, and highlight areas that can be shrunk without damaging too much the quality of the original. For images and other graphic materials (like PDF files), this means a recreation of the original at a smaller resolution (fewer pixels).

Furthermore, once a file is compressed, you may not be able to return it to its original state (unless you keep a backup). So, before you do any compression, it’s highly recommended to backup your files!

Free vs. Paid Tools

Nowadays it’s enough to run a simple Google search and you’ll find a wide array of free compression tools. But should you use them?

We all know the price we pay for the so-called free apps we love to use. So, would it be safe for a business to use a free online compression tool?

Well, it depends on the tool. You should always look for tools that promise to respect your privacy and have an automatic delete sequence in place. This means that, after compression, all the files you uploaded will be deleted (which is why backup is important).

In summary, there are safe-to-use online tools out there – you just need to find the right one.

Home / How does MP3 compression work?

Thousands of songs in the palm of your hand. No more albums full of filler tracks when all you want is the latest single. And forget about buying plastic discs. Two letters and a number have changed the music industry forever: MP3. The format lets people store and trade music with ease thanks to its small file size. MP3 compression is a result of combining maths and the scientific study of how we perceive sound, psychoacoustics.

Sampling the best

Sound is analogue, a constantly varying wave, but computers are digital, representing data as binary numbers. Creating a digital audio recording involves measuring the sound waves at regular intervals, with the quality of the recording dependent on two factors: how often you take a measurement, known as the sampling rate, and how many possible values you assign to the wave, or the bit depth. If the sampling rate isn’t high enough then you won’t properly record high-frequency sounds, while a low bit depth will result in inaccurate measurements and a fuzzy recording.

CDs are recorded at 16-bit and 44.1 kHz, meaning the sound wave is sampled 44,100 times a second at one of 65,526 (2 to the power of 16) possible values. The result is a whole lot of numbers, and a large file size – a standard 80 minute CD takes up 700 MB of memory. With files that big a typical 16GB MP3 player would only hold around 20 albums, so how is it possible for people to walk around with an entire music collection in their pocket? By throwing most of it away!

Bargain bin

How does file compression workIt may surprise you, but the human ear can’t hear everything. We’re limited to a range of sound frequencies, starting at 20 to 20,000 Hz when you’re younger, and shrinking with age as hearing deteriorates. The lowest sounds we can hear are the deep, rumbling bass notes of a giant church organ, while the highest are annoying whines that have been used to scare away teenagers. Some animals can hear outside of this range – whales and elephants at the lower end, bats and mice at the higher end – but to us these sounds might as well be pure silence.

Removing these inaudible frequencies would reduce the amount of memory a track takes up on your hard drive, but how can you separate the silence from the song? MP3 conversion uses a mathematical technique called Fourier transforms to split them up. Any wave, no matter how complex, can be described as a sum of simple sine and cosine waves called a Fourier series. These waves correspond to individual frequencies, and the MP3 algorithm picks out the ones we can’t hear while preserving those in the important 20 to 20,000 Hz range. The result is a wave that contains much less information than the original, but sounds more or less the same to our ears.

MP3 Compression and Huffman Coding

You’d think that dumping all this data would be enough to keep MP3s small, but Fourier transforms aren’t the only mathematical trick for squeezing the most out of your music. A technique called Huffman coding helps reduce file sizes by making the most common parts of an MP3 smaller.

An MP3 recording is basically a list of numbers that describe the sound wave at any given point, and each number is stored as a binary code that can vary in length. Just as the letter E crops up more often than a Z or a Q, some numbers in an MP3 are more common than others, and by examining their frequency we can tweak the binary code to make it more memory efficient.

Numbers that occur most often get a short binary representation, while the less frequent ones are assigned a longer code. On average, the binary for the whole sequence of numbers ends up shorter than if you used a fixed-length code. Huffman coding isn’t just used to create in MP3 compression – it compresses data in zip files, JPEG images, and more. Visit Plus magazine for a full description of the maths behind Huffman coding.

Skip forward

Thanks to these two techniques, the average MP3 is about 10 times smaller than the same song on CD. Smaller means more versatile, and without the maths of Fourier transforms or Hoffman coding, there’d be no iPod, no downloadable music, and the modern world of music would be very different. Other music formats such as AAC (used by iTunes) and Ogg Vorbis followed in the footsteps of MP3, and new efficient ways of encoding music are still in development today. Whatever technique we use to store music in the future, you can be sure mathematicians will help invent it.

People also ask, which ZIP format is used in Java?

The JDK (Java Development Kit) provides necessary classes to make a zip file in java. util. zip package. You case use ZipEntry, ZipFile, and ZipOutputStream classes to compress files and create a zip archive.

Similarly, how do reduce file size? In this section, you’ll use the Reduce File Size command to dramatically reduce or compress the size of a PDF file.

  1. In Acrobat, open a PDF file.
  2. Choose Document > Reduce File Size.
  3. Select Acrobat 8.0 And Later for file compatibility, and click OK.
  4. Name the modified file.
  5. Minimize the Acrobat window.

Also, how do I password protect a zip file with Java?

Add files to folder and compress If you want to compress separate files then add them to an ArrayList and pass that list along with the parameters for compression and encryption to get a password protected zipped file. In the example, unZipPasswordProtectedFiles() method unzips the password protected zipped file.

How do I make a zip file smaller to email?

Select the files or folders to compress; right-click on the selected area and select “Send to.” Click “Compressed (zipped) folder” to compress the selected files and archive them into a single convenient file with the maximum possible data compression.

by Greg Wood | December 1, 2020

Compressing video files can be incredibly useful when sending raw footage or particularily large video files to collaborators, partners, and clients (special shout-out to film festival print traffic coordinators too).

It helps get around the often-frustrating file size limitations of many file transfer and email platforms. Compressed videos also reduce bandwidth usage, upload and download times, and the amount of buffering required when streaming video.

But for all its positives, the unfortunate reality is that compression has a lot of downsides.

  1. It’s an extra step in a workflow when there are already a dozen other things to do.
  2. Compressing video files takes time and can add hours to your turnaround time.
  3. Compressed video takes data from your video file which downgrades video quality. This is especially noticeable if your viewers use a large screen; that pixelated or grainy look is the result of a compression artifact ).

While this may not be a huge issue for weekend warriors transferring clips of their latest snowboarding session, it’s an existential threat for filmmakers and post-production houses who live and die by their quality.

Below we’ll outline the pros and cons of video compression, explain how to compress video, and list some of the most popular techniques and codecs used by video professionals. We’ll also answer the question of whether you really need to compress large video files in the first place.

Especially when there’s a large file transfer service available such as MASV, with no data limits and automatic lossless compression.

But first, let’s take a step back and outline the nuts and bolts of video compression in general.

How does file compression work

Table of Contents:

  • What is Video Compression?
  • How Does Video Compression Work?
  • What Are Video Codecs And How Do They Compress Video?
  • How to Compress Video?
  • The Disadvantages of Compressing Video Files
  • How to Send Uncompressed Video Files?
Prefer to Send Your Large Files Uncompressed?

Discover how you can quickly send uncompressed files (up to 5TB) using MASV.

What is Video Compression?

In short, video compression is the act of reducing video file size by lowering its resolution and bitrate. This is done automatically by an algorithm, which parses the video file and searches for any data that can be removed without corrupting the overall file.

The stronger the compression, the more it impacts the video.

It’s why some video disciplines, like colorists prefer to work with the original file (or files with minimal compression). A video compression algorithm might take out shades of the same color to save space, which in turn, affects the color grading process.

The quality of the compression depends on the video codec used to start the encoding process. Some codecs, like ProRes 422 will reduce the file size but just enough to maintain quality.

How Does Video Compression Work?

How does file compression work

There are three main factors that go into determining the size of a video – resolution, bitrate, and encoding – and they can all play a role in helping reduce video file size:

  • Resolution is the number of pixels, typically represented by a horizontal x vertical measurement (1080p HD video, for example, has a resolution of 1920 x 1080).
  • Bitrate measures how much information is transmitted for each second of video. It’s usually measured in megabits per second (Mbps).
  • Encoding consists of both the codec (the code used to compress the video, including MPEG and ProRes), along with its container or file type (such as AVI or MP4); some file types feature more efficient codecs (MP4 files offer more efficient compression than FLV files, for example).

There are other factors that help determine video file size including video length and frame rate (measured by frames per second, or FPS).

The size of video files, like all data files, is typically measured in bytes or variations thereof: kilobytes (KB, 1024 bytes), megabytes (MB, 1024 kb), gigabytes (GB, 1024 megabytes), and terabytes (TB, 1024 GB).

Videos living in the gigabyte neighborhood and above traditionally have been considered for compression before transferring due to the enormity of this content. Without compression, these massive video files would choke networks and simply not get delivered without the use of more robust networking technology (such as UDP solutions like IBM Aspera).

It’s why so many video professionals still prefer the logistically complicated-if-tried-and-true method of saving files on a hard drive and shipping it by courier. The UDP option is fast but expensive. Hard drives are slow, and you actually run the risk of losing your content in the mail.

Because it involves shrinking or scaling video, it’s crucial for filmmakers or post-production houses using manual compression software to think about where their video will most likely be consumed.

If primarily on YouTube, then a resolution around 1080p will likely be adequate (YouTube offers a guide to its recommended upload encoding settings ), but a video meant for larger screens or sharp, 4k-and-higher displays, should have a higher resolution.

File compression is used to reduce the file size of one or more files. When a file or a group of files is compressed, the resulting “archive” often takes up 50% to 90% less disk space than the original file(s). Common types of file compression include Zip, Gzip, RAR, StuffIt, and 7z compression. Each one of these compression methods uses a unique algorithm to compress the data.

So how does a file compression utility actually compress data? While each compression algorithm is different, they all work in a similar fashion. The goal is to remove redundant data in each file by replacing common patterns with smaller variables. For example, words in a plain text document might get replaced with numbers or another type of short identifier. These identifiers then reference the original words that are saved in a key within the compressed file. For instance, the word “computer” may be replaced with the number 5, which takes up much less space than the word “computer.” The more times the word “computer” is found in the text document, the more effective the compression will be.

While file compression works well with text files, binary files can also be compressed. By locating repeated binary patterns, a compression algorithm can significantly reduce the size of binary files, such as applications and disk images. However, once a file is compressed, it must be decompressed in order to be used. Therefore, if you download or receive a compressed file, you will need to use a file decompression program, such as WinZip or StuffIt Expander, to decompress the file before you can view the original contents.

Related file extensions: .ZIP, .GZ, .RAR, .SITX, .7Z.

Definitions by

The definition of File Compression on this page is an original definition. If you would like to reference this page or cite this definition, you can use the green citation links above.

The goal of is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about the File Compression definition or would like to suggest a new technical term, please contact us.

Want to learn more tech terms? Subscribe to the daily or weekly newsletter and get featured terms and quizzes delivered to your inbox.

Tech Factor

Sign up for the free TechTerms Newsletter

Thank You

We just sent you an email to confirm your email address. Once you confirm your address, you will begin to receive the newsletter.

If you have any questions, please contact us.

Chris Hoffman is Editor-in-Chief of How-To Geek. He’s written about technology for over a decade and was a PCWorld columnist for two years. Chris has written for The New York Times and Reader’s Digest, been interviewed as a technology expert on TV stations like Miami’s NBC 6, and had his work covered by news outlets like the BBC. Since 2011, Chris has written over 2,000 articles that have been read nearly one billion times—and that’s just here at How-To Geek. Read more.

How does file compression work

The NTFS file system used by Windows has a built-in compression feature known as NTFS compression. With a few clicks, you can compress files, making them take up less space on your hard drive. Best of all, you can still access the files normally.

Using NTFS compression involves a trade-off between CPU time and disk activity. Compression will work better in certain types of situations and with certain types of files.


NTFS compression makes files smaller on your hard drive. You can access these files normally – no need for cumbersome zipping and unzipping. Like with all file compression systems, your computer must use additional CPU time for decompression when it opens the file.

However, this doesn’t necessarily mean it will take any longer to open the file. Modern CPUs are very fast, but disk input/output speeds haven’t improved nearly as much. Consider a 5 MB uncompressed document – when you load it, the computer must transfer 5 MB from the disk to your RAM. If that same file were compressed and took up 4 MB on the disk, the computer would transfer only 4 MB from the disk. The CPU would have to spend some time decompressing the file, but this will happen very quickly – it may even be faster to load the compressed file and decompress it because disk input/output is so slow.

On a computer with a slow hard disk and a fast CPU – such as a laptop with a high-end CPU but a slow, energy efficient physical hard disk, you may see faster file loading times for compressed files.

This is especially true as NTFS compression isn’t very aggressive in its compression. A test by Tom’s Hardware found that it compressed much less than a tool like 7-Zip, which reaches higher compression ratios by using more CPU time.

When To Use and When Not to Use NTFS Compression

NTFS compression is ideal for:

  • Files you rarely access. (If you never access the files, the potential slow-down when accessing them is unnoticeable.)
  • Files in uncompressed format. (Office documents, text files, and PDFs may see a significant reduction in file size, while MP3s and videos are already stored in a compressed format and won’t shrink much, if at all.)
  • Saving space on small solid state drives. (Warning: Using compression will result in more writes to your solid state drive, potentially decreasing its life span. However, you may gain some more usable space.)
  • Computers with fast CPUs and slow hard disks.

NTFS compression should not be used for:

  • Windows system files and other program files. Using NTFS compression here can reduce your computer’s performance and potentially cause other errors.
  • Servers where the CPU is getting heavy use. On a modern desktop or laptop, the CPU sits in an idle state most of the time, which allows it to decompress the files quickly. If you use NTFS compression on a server with a high CPU load, the server’s CPU load will increase and it will take longer to access files.
  • Files in compressed format. (You won’t see much of an improvement by compressing your music or video collections.)
  • Computers with slow CPUs, such as laptops with low-voltage power-saving chips. However, if the laptop has a very slow hard disk, it’s unclear whether compression would help or hurt performance.

How to Use NTFS Compression

Now that you understand which files you should compress, and why you shouldn’t compress your entire hard drive or your Windows system folders, you can start compressing some files. Windows allows you to compress an individual file, a folder, or even an entire drive (although you shouldn’t compress your system drive).

To get started, right-click the file, folder, or drive you want to compress and select Properties.

How does file compression work

Click the Advanced button under Attributes.

How does file compression work

Enable the Compress contents to save disk space check box and click OK twice.

How does file compression work

If you enabled compression for a folder, Windows will ask you whether you also want to encrypt subfolders and files.

How does file compression work

In this example, we saved some space by compressing a folder of text files from 356 KB to 255 KB, about a 40% reduction. Text files are uncompressed, so we saw a big improvement here.

Compare the Size on disk field to see how much space you saved.

How does file compression work

Compressed files and folders are identified by their blue names in Windows Explorer.

How does file compression work

To uncompress these files in the future, go back into their advanced attributes and uncheck the Compress checkbox.

The NTFS file system volumes support file compression on an individual file basis. The file compression algorithm used by the NTFS file system is Lempel-Ziv compression. This is a lossless compression algorithm, which means that no data is lost when compressing and decompressing the file, as opposed to lossy compression algorithms such as JPEG, where some data is lost each time data compression and decompression occur.

Data compression reduces the size of a file by minimizing redundant data. In a text file, redundant data can be frequently occurring characters, such as the space character, or common vowels, such as the letters e and a; it can also be frequently occurring character strings. Data compression creates a compressed version of a file by minimizing this redundant data.

Each type of data-compression algorithm minimizes redundant data in a unique manner. For example, the Huffman encoding algorithm assigns a code to characters in a file based on how frequently those characters occur. Another compression algorithm, called run-length encoding, generates a two-part value for repeated characters: the first part specifies the number of times the character is repeated, and the second part identifies the character. Another compression algorithm, known as the Lempel-Ziv algorithm, converts variable-length strings into fixed-length codes that consume less space than the original strings.

The NTFS File System File Compression

On the NTFS file system, compression is performed transparently. This means it can be used without requiring changes to existing applications. The compressed bytes of the file are not accessible to applications; they see only the uncompressed data. Therefore, applications that open a compressed file can operate on it as if it were not compressed. However, these files cannot be copied to another file system.

If you compress a file that is larger than 30 gigabytes, the compression may not succeed.

The following topics identify the NTFS file system file compression:

File Compression and Decompression Libraries

The file compression and decompression libraries take an existing file or files and produce a file or files that are compressed versions of the originals. The compression is also lossless, but the compression is not transparent to applications. An application can only operate on such files with the assistance of a file compression library. In addition, the only operations you can perform on such files are creating a compressed file from an original and recovering the original data from the decompressed version. Editing is typically not supported, and seeking is limited if supported at all.

Typically, an application calls functions in Lz32.dll to decompress data that was compressed using Compress.exe. The functions can also process files without attempting to decompress them.

You can use the functions in Lz32.dll to decompress single or multiple files. You can also use them to decompress compressed files a portion at a time.

The following topics identify the file decompression that is provided by the functions in Lz32.dll:

Compression is one of those studio processes that is all too often taken for granted and not used to its full potential. Today’s producers think nothing of inserting compressors on every single channel of their DAW when mixing, but old school engineers had to learn to make the most of only a few units of compression—and this made us learn them inside out.

Republished Tutorial

Every few weeks, we revisit some of our reader’s favorite posts from throughout the history of the site. This tutorial was first published in December of 2008.

Need Extra Help?

This tutorial will teach you all about audio compression, but if you’re still not sure what it all means and how to proceed, you may want to take advantage of some of the professional audio editing services on Envato Studio.

What Is Compression?

Compression is the process of lessening the dynamic range between the loudest and quietest parts of an audio signal. This is done by boosting the quieter signals and attenuating the louder signals. The controls you are given to set up a compressor are usually:

  • Threshold – how loud the signal has to be before compression is applied.
  • Ratio – how much compression is applied. For example, if the compression ratio is set for 6:1, the input signal will have to cross the threshold by 6 dB for the output level to increase by 1dB.
  • Attack – how quickly the compressor starts to work.
  • Release – how soon after the signal dips below the threshold the compressor stops.
  • Knee – sets how the compressor reacts to signals once the threshold is passed. Hard Knee settings mean it clamps the signal straight away, and Soft Knee means the compression kicks in more gently as the signal goes further past the threshold.
  • Make-Up Gain – allows you to boost the compressed signal. as compression often attenuates the signal significantly.
  • Output – allows you to boost or attenuate the level of the signal output from the compressor.

How does file compression work

Compression Types

Compressors come in various different flavors. These are used by engineers for different tasks and some sound far better in certain situations than others.

VCA Compression

Voltage Controlled Amplifier compressors use an integrated circuit to give very precise control. They are less colored and suffer from very few side effects like distortion, which make them ideal for lots of different tasks. The dBx 160 is a VCA compressor.

Opto Compression

Opto, meaning optical, describes the light sensitive circuits that control the compression amount in opto compressors. They often react more slowly than other compressor types, but this can be desirable. The famed Teletronix LA2A is an optical compressor that many producers swear by for vocals and mix bus compression. The LA2A is also a ‘leveling amplifier’ — which means it is working nearly all the time, not just when a threshold is reached.

FET Compression

Field Effect Compressors use transistors to emulate a valve sound with more reliability, but with a higher signal to noise ratio. They are popular for vocals and great for drum compression. The Urei 1176 is a FET compressor.

Valve Compression

Valve compressors work in one of the three ways described above, but use valves in the amplifier circuit to get that ‘creamy’ sound. The LA2A, which is an opto compressor, uses valves.

How Set Up a Compressor

1. Whether you’re using a hardware compressor or a plug-in, setting up works the same way. Insert the compressor on the channel you want to compress.

2. Adjust the threshold until the peaks in the signal are pushing over the threshold and triggering the compressor. Unless, of course, you really want to clamp something—like a live bass maybe—in this case it can work to make it push over the threshold all the time.

3. Set the Ratio to suit the material. Bass guitars sound good at 4:1, drums at 2:1, vocals also at 2:1 and electric guitars anywhere from 2:1 to 6:1.

4. The Ratio and Threshold work together. Adjust them together and see how they affect the output.

5. The attack and release controls shape how the compressor reacts. A fast attack would be useful for a rapper or anything that has sudden peaks early in the signal. Slower attack times suit mastering uses and buss compression.

6. The release control can really affect the sound of the compressor. Short release times cause the compressor to sound like it’s working hard, but long release times sound more natural.

7. Use the make-up gain and output control to sit the signal back into the mix without adding any unnecessary noise.

8. Setting the hard/soft knee would depend on the material. Hard knee works well for drums, bass and percussive stuff. Soft knee is more transparent and better for vocals and some guitar parts.

9. Look-ahead. Plug-in compressors often have this feature. It uses a slight time delay on the whole song to give the compressor a sneak preview of what’s coming. This allows it to catch all the peaks in the smoothest possible way. It can sometimes cause the compressor to lose its ‘character’ so don’t use it by default—only if necessary.

For every rule about setting up compressors, there’s someone who has broken the rules and made a great sounding record, so experiment.

A final word of warning—compressing on the way to your recording format, be it tape or hard disk—can’t be undone. Use compression sparingly whilst recording. Save it for the mix until you’ve got enough experience to know you’re not overdoing it.

Example Audio

Here is the same drum loop processed with the standard Apple Logic compressor with a variety of settings.

The clean drum loop with no compression applied.

Opto compression with a slow attack and release, 6:1 ratio and a very low threshold. This is the classic drum pumping sound.

This is the same compression as used above, but with a fast attack.

FET compression with a 2:1 ratio, medium attack and release, and the threshold just peaking.

Same as above, but with a 30:1 ratio. This sound is really getting crushed.

So what plug-in compressors can you use to emulate the sounds of the classics? Well, there are legit emulations of the 1176 and LA2A, and other classic compressors. But there are alternatives.

How does file compression work

The Waves RVox sounds very similar to the Urei 1176 and works in a similar way. Hard to beat on vocals.

How does file compression work

The PSP Vintage Warmer can sound just like an LA2A. It can also sound very much like an array of tube compressors, like the Manley and Thermionic Culture stuff.

How does file compression work

The PSP Mixpressor2 can be made to sound very similar to things like the Fairchild compressors and also the 1176.

I usually assumed that tar was a compression utility, but I am unsure, does it actually compress files, or is it just like an ISO file, a file to hold files?

How does file compression work

4 Answers 4

Tar is an archiving tool (Tape ARchive), it only collects files and their metadata together and produces one file. If you want to compress that file later you can use gzip/bzip2/xz. For convenience, tar provides arguments to compress the archive automatically for you. Checkout the tar man page for more details.

tar produces archives; compression is a separate functionality. However tar alone can reduce space usage when used on a large number of small files that are smaller than the filesystem’s cluster size. If a filesystem uses 1kb clusters, even a file that contains a single byte will consume 1kb (plus an inode). A tar archive does not have this overhead.

BTW, an ISO file is not really “a file to hold files” – it’s actually an image of an entire filesystem (one originally designed to be used on CDs) and thus its structure is considerably more complex.

The original UNIX tar command did not compress archives. As was mentioned in a comment, Solaris tar doesn’t compress. Nor does HP-UX, nor AIX, FWIW. By convention, uncompressed archives end in .tar .

With GNU/Linux you get GNU tar. (You can install GNU tar on other UNIX systems.) By default it does not compress; however, it does compress the resulting archive with gzip (also by GNU) if you supply -z . The conventional suffix for gzipped files is .gz , so you’ll often see tarballs (slang for a tar archive, usually implying it’s been compressed) that end in .tar.gz . That ending implies tar was run, followed by gzip, e.g. tar cf – .|gzip -9v > archive.tar.gz . You’ll also find archives ending in .tgz , e.g. tar czf archive.tgz . .

Edit: reminded me that GNU tar supports much more functionality than merely compressing with gzip, and it reminded me that the suffixes are more than plain conventions. They have built-in semantics. It also supports bzip2 ( -j for .bz2 ) and old compress ( -Z for .Z ). Then I looked at the man page and was reminded that -a automatically maps your desired compression method based on suffix.

One other nit. As the Linux tar man page says, GNU produces info pages, not man pages, so to learn all about GNU tar, run info tar .

Zipped (compressed) files take up less storage space and can be transferred to other computers more quickly than uncompressed files. In Windows, you work with zipped files and folders in the same way that you work with uncompressed files and folders. Combine several files into a single zipped folder to more easily share a group of files.

Locate the file or folder that you want to zip.

Press and hold (or right-click) the file or folder, select (or point to) Send to, and then select Compressed (zipped) folder.

A new zipped folder with the same name is created in the same location. To rename it, press and hold (or right-click) the folder, select Rename, and then type the new name.

Locate the zipped folder that you want to unzip (extract) files or folders from.

Do one of the following:

To unzip a single file or folder, open the zipped folder, then drag the file or folder from the zipped folder to a new location.

To unzip all the contents of the zipped folder, press and hold (or right-click) the folder, select Extract All, and then follow the instructions.

To add files or folders to a zipped folder you created earlier, drag them to the zipped folder.

If you add encrypted files to a zipped folder, they’ll be unencrypted when they’re unzipped, which might result in unintentional disclosure of personal or sensitive information. For that reason, we recommend that you avoid zipping encrypted files.

Some types of files, like JPEG images, are already highly compressed. If you zip several JPEG pictures into a folder, the total size of the folder will be about the same as the original collection of pictures.

How does file compression workIf you’re not sure how to compress a PDF so that you can share and store it more easily, then you’ve come to the right place.

But, before we go on to the tutorial, let’s explore what exactly PDF compression implies.

Generally speaking, compression is a process through which we optimize bits and bytes in order to reduce overall file size and “fit things better”.

Unfortunately, that compression is often done at an expense to file quality.

That can be seen in compressing JPEG images in Photoshop: the more you reduce the image file size, the worse the quality gets. And vice versa.

Well, the same is for digital documents, except in this instance, you don’t necessarily have to lose too much quality as here we have a lot more compression options.

For example, PDF documents are naturally optimized for compression.The PDF, by default, supports two biggest compression types: lossless and lossy.

This article further explains these two types of compression , however you should note the main difference:

  • Lossless is used for documents containing text, as its algorithm creates reference points for textual patterns, stores them in a catalog and then brings them back to your file.
  • Lossy is mainly for images and graphics, as it reduces file size by eliminating bits of information. The end result is a compressed image, but with reduced file quality.

Of course, these compression algorithms won’t happen by themselves. They usually require a PDF compression software, which can be either online or desktop.

When you apply a PDF compressor software to your PDF document, two things happen:

1) The images get downsampled and compressed using either JPEG, ZIP or LZW compression methods.

2) The text gets compressed using a lossless algorithm.

Since we got the technical bit out of the way, let’s explore the two only ways to compress a PDF document.

1. Compress your PDF using a desktop software – gives you better compression, more control over downsampling methods and is much more secure. However it takes some time to download and install the software, which is the main reason why a lot of people resort to the second option.

2. Compress your PDF using an online tool – this is much faster and does the job well for most users. Using this method you can usually reduce your PDF by around 20-30%, depending on its structure and complexity. For business users, however, we recommend a desktop tool, like Able2Extract.

Let’s now explore these two options and see which one suits you the best.

How to Compress a PDF File with Desktop Software

Compressing PDF using a desktop tool is where we can really dial in on the details and fine tune our compression settings. This is perfect when you need to reduce the size as much as possible and is especially useful when you need to email a PDF. Let’s get started.

Open your PDF software of choice. We’ll use our very own Able2Extract .

Go to View > PDF Creation Options.

Navigate to the Compression tab.

How does file compression work

There are 3 main panels here, all related to image compression, which is something that takes up most of the space in PDF documents, in terms of file size. Leave the Compress Text checked and set up everything like in the image below.

This is the template for the biggest possible PDF compression in Able2Extract.

How does file compression work

Once you set everything up, hit OK and, the next time you use the Create PDF feature, every PDF will be fully compressed.

How to Compress PDF Using Online Tools

By far, the most popular way of compressing a PDF document is uploading it to an online tool of choice and hitting “Compress”. Yes, this does actually work pretty good. Well, in most cases.

You should note that, when it comes to file and document security, nothing does a better job than a desktop tool that can process everything locally, without uploading your file to an external server.

That being said, there are a lot of free & dependable PDF compression tools that you can find easily by searching online.

These tools do a pretty good job at converting smaller documents and, depending on the type of your PDF, you can even get more than 30% compression.

They are all fairly easy to use and, even better, most of them are completely free. However, they do have some limitations be it either in terms of file size or the number of compressions.

So, there you go, a quick and useful tutorial on PDF compression. To recap one more time:

For compressing large and/or sensitive PDF files, use a desktop software (like Able2Extract) to fine tune your compression settings for both images and text.

To compress smaller (not so important) files even more, use an online tool as a faster way of PDF compression, which also let you work on your PDFs on the go.

Atomic Object’s blog on everything we find fascinating.

Historically used for CAD and video games, 3D computer models are working their way into the mainstream. This is, in part, due to the rise in popularity of things like augmented reality and 3D printing.

My current project uses 3D model data, and my team was looking for an efficient way to upload this data to our server. The file sizes for 3D models can often be very large, so compressing the files was a requirement. We initially tried using standard compression approaches (e.g., gzip, 7-Zip, etc.) and were able to make some progress, but even the compressed files were still pretty large. Then we discovered Draco.

Draco is an open-source library for compressing and decompressing 3D mesh data. Thus far, it has worked well for us. In fact, it has worked so well it’s hard to believe.

In this post, I’ll give a quick rundown of installing and using Draco, then walk through an experiment that demonstrates how well it can compress 3D model files.

Installing Draco

Draco was created by the Google Chrome media team. It’s open-source and available on GitHub. The GitHub README provides installation and execution instructions for different platforms.

To use the Draco command-line tools on Mac OS, I did the following:

  1. Clone the Draco repository
  2. Create a new directory and cd into it
  3. Run cmake path/to/local/draco-repository
  4. Run make

Note: I installed cmake on my Mac via Homebrew ( brew install cmake ).

After running make , you should have draco_encoder and draco_decoder binaries that you can run from your shell.

Using Draco

Draco supports compressing OBJ and PLY files. If your 3D model files are in a different format, you’ll have to convert them before using Draco.

You can compress an input file via:

The above will generate a compressed myfile.drc .

To decompress, simply run:

Compression: Lossy vs. Lossless

Draco compression can be both lossy or lossless, depending on the input file and compression settings.

Note: Under the hood, it seems that Draco switches between the lossy, but efficient, Edgebreaker algorithm and a different compression algorithm, depending on how it is run.

There are a few notable command-line options that control how the input file is compressed.

One option is the compression level. This level can be set via the cl command-line flag (e.g., -cl 8 ). It can can vary from 0 to 10, but the default is 7. Draco’s documentation states that the compression level turns on/off different compression features, but it doesn’t go into detail about what features this includes, or when they are turned on/off.

Another knob you can control is something called the quantization parameter. It can be controlled via the qp flag (e.g., -qp 14 ). The specified value is the number of bits that Draco will use to quantize different attributes. A value of 0 will not perform any quantization. The default value is 14.

The Draco docs state:

In general, the more you quantize your attributes the better compression rate you will get. It is up to your project to decide how much deviation it will tolerate. In general, most projects can set quantization values of about 14 without any noticeable difference in quality.

Compression Experiment

To give an idea of how well Draco can compress files, let’s look at few examples. I downloaded two 3D model files from the Stanford 3D Scanning Repository.

Stanford Bunny:
How does file compression work

How does file compression work

The below table summarizes the compression observed when compressing these models using the default Draco encoder settings.

Model File Size Compressed Size Compression %
Bunny 3 MB 82 KB 72.6 %
Dragon 33.8 MB 1.1 MB 96.7 %

Both models were quite compressible–especially the Dragon model.

Anecdotally, I’ve found that most files that are at least tens of MBs are able to be compressed to around 5% of the original file size. Files that are smaller (few MBs) tend to do a bit worse.

Additional Integrations

In addition to the command-line tools, Draco also supports some nice browser integrations. Specifically, three.js supports reading and rendering Draco (.drc) files.

Beyond command-line applications, the Draco encoder and decoder can both be run via JavaScript and C++.

By Indeed Editorial Team

Published September 29, 2021

Copy to Clipboard

If you’re interested in sharing PDF files with your coworkers, knowing how to adjust the file size is an essential skill. Knowing how to change the size of a PDF file can help you send upload documents faster, which can save time and improve your productivity. Understanding different methods of altering a PDF’s file size can also help you prepare your document in a variety of situations. In this article, we discuss the benefits of changing the size of PDF files and explain two methods for how to reduce PDF file sizes.

Benefits of reducing the file size of a PDF

Large files, like those larger than one megabyte, typically contain an extensive amount of information, such as text and images. Compressing a PDF file can help you store an extensive amount of information while using a small amount of memory on your device. Reducing the file size can also help you upload a PDF file more quickly, which may simplify the process of sending it to a coworker, customer or client via email.

How to reduce PDF file size

Below are several steps that may help you reduce the size of your PDF file:

1. Determine the size of your PDF

The first step to reducing the file size of your PDF is to find the size of your PDF. If you’re using Adobe Acrobat, you can follow these steps to find the size of your PDF file:

Click on “Properties.”

Find the “File Size” text.

If you’re using another method, you can follow these steps to help you find the PDF file size:

Open your computer’s file explorer.

Select the folder your PDF file is in.

Select your PDF file.

Read how large the file is in the “Size” column.

Once you find the size of your PDF, consider writing a note of it to reference after compressing the file later.

2. Use electronically converted files when possible

To keep your original PDF files small, try using electronic conversions. Many word processors have an option to convert the file directly to a PDF and doing this keeps the file size small when compared to printing the document out and then scanning it as a PDF. The reasons that scanned documents may be larger include:

The scanner detecting color on a black and white document

The scanner defaulting to 300 dots per inch (DPI) despite PDF files needing only 72 DPI

3. Choose a file size reduction method

There are four common methods for reducing PDF file size:

Using the Adobe Acrobat PDF Optimizer tool

Saving a Microsoft Word file as a PDF

Utilizing an online compressor tool

Converting the document into a ZIP file

4 methods of reducing the file size of a PDF

You can review the four methods below to choose the one that’s right for your PDF file:

1. Use the Adobe Acrobat PDF Optimizer tool

If you use Adobe Acrobat when working with PDF files, you can try the following techniques to reduce your PDF file size:

Change the color formatting

Changing your PDF file’s color formatting from CMYK to RGB may reduce the file size. You can do this by following the steps below:

Open the PDF in an Adobe program like Acrobat Pro.

Select “Print Production.”

Choose “Convert Colors.”

Pick the RGB color space.

Select the FOGRA 39 conversion profile.

Choose the pages of the PDF file you want to modify.

Click “OK” and wait for the file to convert.

After you change the color formatting, you can check the size of the file to see if you compressed it successfully.

Delete unnecessary components

Blank space in your PDF file can also affect its file size. Removing these spaces can help you reduce the file size. You can do this by following the steps below:

Click “Advanced Optimization.”

Choose “PDF Optimizer.”

Select “Audit Space Usage.”

After the program processes your request, save your PDF file. Then compare it to the original file size to determine whether you’ve reduced the size of the file.

Save the file as a reduced size PDF

This is one of the simpler ways you can reduce the size of your PDF file. While it may reduce the quality of images and remove digital signatures, it can also make the file easier to share quickly. You can follow the steps below to reduce the size of your PDF file this way:

Open your PDF file.

Choose “Save as Other.”

Click “Reduced Size PDF.”

2. Reduce the size when saving in Microsoft Word

If you’ve drafted your document in Microsoft Word, you can digitally convert the file into a PDF. Consider following the steps below to save a minimum size PDF file from a Word document:

Open the Word document you want to save as a PDF file.

Select the “File” button at the top of the screen.

Select “PDF” as the file type.

Enter your file name.

Find the “Optimize for” option.

Select “Minimum Size (Publishing Online).”

After you save the PDF, you can check the size to make sure that it meets your size requirements.

3. Use a print-to-PDF program or online PDF compressor

Print-to-PDF programs and online PDF compressors can reduce the size of your PDF file without the use of a program like Adobe Acrobat Pro. Some online compression services and programs that have this capability include:

Some of these programs may compress the file automatically, while others may require you to complete a few steps before completing the compression process. For example, a program may request the user to save the file as a reduced-size PDF, which may affect the quality of any images and fonts included in your document. You can check the quality and size of your PDF after you compress it by searching for it in your file explorer.

4. Convert the PDF into a ZIP file

You can compress your document by converting it into a ZIP file with the steps below:

Open your file explorer.

Find the PDF you want to compress.

Right-click the file.

Choose “Compressed (zipped) folder.”

Converting PDF files in this way can also help if you have several large documents to send to the same person or if you want to store them together.

Please note that none of the organizations mentioned in this article are affiliated with Indeed.

You can compress your Working Papers files to save space on your workstation when the file is not in use, and to simplify the process of copying and moving files.

  • If a compressed file has Protection enabled, you must log in before you can uncompress and open the file.
  • You cannot compress a file if another staff member has it open.
  • You cannot compress a file with checked out documents.

You can compress a file manually, or set it to compress automatically when closed.

To manually compress a Working Papers file:

  1. In Working Papers, open the file you want to compress.
  2. On the ribbon, click File | Save Compressed. The Compress File dialog displays.
  3. Select whether or not you want to include .BAK (Backup) files and/or sub-folders in the compressed file. Click Yes.

The file is compressed. Compressed files use the .ac_ file extension.

To automatically compress a Working Papers file on close:

  1. On the ribbon, click Tools | Options.
  2. On the General tab, select an option in the Auto Compress drop-down menu.
    • No: Do not automatically compress the file when closed.
    • Yes: Automatically compress the file when closed.
    • Prompt: Display a prompt to compress the file when closed.
    • Yes (with subfolders): Automatically compress the file with sub-folders when closed.
  3. Click OK.

When you close the file, it is compressed.

Visit us: | Follow us: How does file compression work How does file compression work How does file compression work How does file compression work

Data reduction methods, such as compression or deduplication, can have a positive effect on performance, but the significant CPU resources required could overshadow the benefits.

How does file compression work

Data compression and deduplication have humble beginnings as optional add-ons for capacity-challenged companies, but in the modern era, they are must-have features for almost all storage systems. Together, they have helped to usher in an era of high-performance flash storage that maintains at least a semblance of pricing sanity. Without them, it’s unlikely the flash revolution would have been nearly as pervasive.

These technologies, however, are sometimes controversial when it comes to determining their impact. The capacity impact of both compression and deduplication is highly dependent on the underlying data being managed. What is sometimes overlooked is the fact that they can have both a positive and a negative effect on storage performance.

On the negative front, both compression and deduplication can require significant CPU resources in order to work their magic. For deduplication, as blocks of data are fed into the storage system, each one is fingerprinted and checked against a master fingerprint table called a hash table. If a fingerprint already exists, that means the data block already exists on the storage system and the data isn’t written again. If the fingerprint doesn’t exist, the data is written as usual.

This fingerprint-checking process can impose some increased latency on storage write operations — although, with advances in modern storage systems, this is practically negligible. The deduplication engine itself requires CPU cycles to process the lookup, so it may have some effect on other storage operations. That said, modern CPUs are multicore behemoths that have cycles to spare. In the past, this may have been a consideration more than it is today. Older processors were far less efficient than those in use now.

From there, whether deduplication is a positive or negative from a performance perspective becomes a bit murkier and is dependent on the data itself. If there is a lot of duplication in data, deduplication can be a net positive since you can basically throw away more write operations. Write operations tend to be the slowest variety, so the fewer you have to perform, the less the performance hit you take. For regular workloads, you simply have to make a judgment call: Is the negligible performance impact outweighed by the capacity savings you experience?

Compression is a similar story. You achieve reduced storage capacity outcomes at the expense of some CPU cycles. In this case, the underlying data types matter a lot. If you are trying to store data that’s already compressed, like certain video and photo formats, compression won’t actually yield any savings, so you’ll just be wasting CPU cycles trying to get more gains that won’t come to fruition. On compressible data, though, you need to make a similar assessment as with deduplication: Is the potential for CPU impact worth the capacity gain?

The best method to determine whether compression and deduplication are right for you is to test them and see what their impact is in terms of cost and performance.


File compression is commonly used when sending a file from one computer to another over a connection that has limited bandwidth. The compression basically makes the file smaller and, therefore, the sending of the file is faster. Of course, when compressing a file and sending it to another computer that computer has to have a program that will decompress the file so it can be returned to “normal” and used.

The next step to compressing a single file is the combining of multiple files into a single compressed archive. By performing this combination process the archive both serves to make the transmission faster for all the files and manages to keep them together for convenience.

Finally, the next step after combining multiple files into a single archive is to maintain the organization of those files once inside the archive. If, for example, multiple files need to be in multiple directories (folders) in order to correctly work on the receiving computer then one characteristic of such an archive would be to keep that directory structure intact within the archive and having the decompression program maintain the directory structure when decompressing the archive.

Why So Many Formats?

You may have noticed in files you’ve encountered, been sent, or just seen written about that there are many different compression formats; each with their own different file extension and compression algorithm. Why so many? There are a variety of reasons. One is simply that different formats were developed for different operating systems over time and these legacy formats continue on today. Another is competition; companies try to develop new and “improved” formats to get the last little bit of fat out of the compression in an attempt to become the “next standard.” The type of file compressed has some bearing on the format of the file being compressed as well; pictures and text often get better compression ratios using different compression techniques for each. And, some people just like to develop something “new” in order to leave their stamp on the industry. Plus, probably as many other reasons as there are formats :-).

How to Download and Decompress Files

  • Download a file simply by clicking on its filename (or on whatever link the author has provided).
  • In Internet Explorer choose the save to disk option from the download dialog. In Firefox you will also be given an option to save to disk. If you are using Netscape, it may say “No Viewer Configured for File Type…” just choose the save or save to disk option.
  • It is best to save the file to a temporary directory that you’ve created just for this purpose. For example, I have a subdirectory on my hard drive named \TEMPDOWN which I use strictly for downloading and decompressing files. That way you always know where the file is and you can always move it from there to a more permanent location when you are finished with it.
  • Use a decompressing utility on the downloaded file. Here you have to use some thought. If the compressed file has a folder structure inside the file you may have to let the utility create this folder structure on your hard drive. Most archives with multiple files in them will have a text file with directions. It is usually called README.TXT, INSTALL.TXT, or some other similar file. Most decompression programs have the capability of displaying the contents of the archive and extracting/viewing single files in the archive. If you see an instruction file we recommend you read it first, to determine what steps are required to actually dearchive, install and/or launch the program.
  • Some programs do not require any additional installation process. In these cases, you can simply create a permanent directory for the program, and copy the files from your temporary directory to the permanent program directory.
  • Once you’ve completely installed the program, and you are sure that it works properly, you can go back and delete the various installation files from your temporary subdirectory. However, you should keep a copy of the original archive file just in case you need to install it again in the future.

Compression/Decompresson Software

There are a variety of programs that compress and decompress files. Some are operating system dependent and others have versions for multiple operating systems. The major programs/formats include:

  • 7-Zip(.7z file) – A popular archive format. The free 7-Zip program can also handle many other formats.
  • GNU Zip(.gz file) – Used on many *NIX operating systems. Many programs support this archive type.
  • LHA (.lha or .lzh file) – This is now used on multiple operating systems and is a standard on Amiga systems. Free unarchivers exist.
  • RAR(.rar file) – A proprietary format second only to .zip on Windows systems. WinRAR is a popular program to use although free unarchivers exist.
  • StuffIt(.sit file) – A popular archive format for the Macintosh although it can be found on other operating systems.
  • Tape archive(.tar file) – Used on many *NIX operating systems. Many programs support this archive type.
  • WinAce(.ace file) – A format often used for CD/DVD images. The WinACE program is not free but free dearchivers exist for older versions of the format and the commercial version has a free trial period.
  • Zip(.zip file) – Probably the single most popular archive format out there. Many programs support this archive type (both free and commercial). Even Windows itself can create and dearchive .zip files

Compressed (e.g., archived or zipped) files may contain many separate files in one large archive, which often takes up less space than the original files. Before you can read or run all the separate files and programs, you must use an archiving program to extract the files from the archive. In Windows, you can compress (zip) and decompress (unzip) files without installing any third-party programs.

Compressing a file or folder

  1. From the Start menu, open Computer (Windows 7 and Vista) or My Computer (Windows XP).
  2. Select the files or folders you want to compress. To select multiple files or folders at once, hold down the Ctrl key while you click each item.
  3. Right-click the selected items, choose Send to , and then click Compressed (zipped) folder . This will create a zipped file in the same directory that the files are located. The file extension will be .zip .

Note: The new .zip file will have the same name as the file or folder you compressed. If you compress multiple items, the file name will be the same as the file you right-clicked to start the compression.

Decompressing a zipped file or folder

  1. From the Start menu, open Computer (Windows 7 and Vista) or My Computer (Windows XP).
  2. Find the file you want to decompress, right-click it, and choose Extract All .
  3. In the dialog box that appears, to choose the destination for the decompressed files, click Browse. . You can also check the option Show extracted files when complete .
  4. Click Extract .

Note: When you zip or unzip files, the original files are not deleted. If you want to delete the original files, you will have to do so manually.

Other options for file compression and decompression

For zipping and unzipping most files, the built-in Windows utility will suffice; however, if you encounter a compressed format not supported by the built-in Windows tools, you can try one of the following programs:

Note: These third-party tools are not available on IUware and may require purchase, although most offer free trials.

This is document ahyt in the Knowledge Base.
Last modified on 2018-01-18 12:45:22 .

Summary : File compression is an easy way to reduce the size of a file and save storage space. This post will offer practical ways to enable NTFS Compression to compress files & folders in Windows 10.

Sometimes, we need to free up some storage space on the Windows 10 drive, when the drive is running out of disk space. There are many ways that can free up the disk space on Windows 10, such as uninstalling unnecessary programs and Apps, deleting the files you don’t need, using disk cleanup programs, saving files to the cloud storage tools, etc.

In addition to the methods mentioned above, Windows 10 OS Compression and NTFS Compression are also feasible and straightforward ways to free up disk space. Let’s go through several ways to compress Windows 10 files and folders.

Tip: Though file compression is safe, you’d better back up the essential files in case data loss occurs.

Table of Contents

Practical Ways to Compress Windows 10 Files to Free Up Disk Space

Compress Windows 10 Operating System to Make More Disk Space

Step 1: Type CMD in the Start menu search field and choose Run as administrator and click Yes to run Command Prompt.

How does file compression work

Step 2: Before starting to compress Windows 10 OS, you’d better check the compact state to see whether the system is already using this feature. Just type the command: Compact /CompactOS:query in the Command Prompt and press Enter.

How does file compression work

Step 3: The system will now notify you if the feature is active. If it shows that Windows 10 is not in the Compact state feature, the system can be easily enabled.

Step 4: Type the command: Compact /CompactOS:always and then press Enter. It will start to compress the Windows 10 OS.

How does file compression work

The system will show you the current status when compressing OS binaries. When the compression is finished, the system will display the results, including the number of compressed files and the compression ratio.

Windows OS compression will gain up to 2 GB of free space on the drive. If you need to know the exact free space, you can check the properties of the drive.

Extra tip: Uncompress Windows 10 OS

● To undo the Compact State feature and Uncompress Windows 10 OS, type in the command: Compact /CompactOS:never and press Enter.

How does file compression work

The system will begin to compress the files to restore the changes and shift the operating system back to its normal state.

The system will inform you once the changes have been reverted to their original state successfully.

Compress Windows 10 Files using the NTFS compression

The NTFS file compression is built into the file system so that this feature can only be available in the NTFS drive. You can click the property of the drive to check the type of its file system.

NTFS File Compression

NTFS file compression is the easiest way to reduce the size of files without compressing the whole drive.

Step 1: Open File Explorer. And then move to the folder where you want to store compressed files.

Step 2: Click on the Home button and then click the New folder, Or you can also try the quick way by pressing Ctrl + Shift + N.

Step 3: Type a name for this folder and press Enter.

Step 4: Right-click this folder and select the Properties.

Step 5: Click the Advanced in the General

How does file compression work

Step 6: Choose “Compress contents to save disk space” under “Compress or Encrypt attributes” section. Then click OK and Apply button.

How does file compression work

Step 7: Select the box “Apply changes to this folder, subfolders, and files” in “Confirm Attribute Changes” and click OK.

NTFS Drive Compression

Step 1: Open File Explorer and move to This PC, then right-click the drive you want to compress and select Properties.

Step 2: Choose the option Compress this drive to save disk space under the General tab, and then click Apply.

How does file compression work

Step 3: Check Apply changes to drive (drive letter), subfolders and files and click OK when confirmation dialogue occurs.

By doing the above steps, NTFS Compression is enabled so that there is more free space on the drive.

Extra tip: Uncompress Windows 10 Drive

  1. Right-click the drive and select Properties.
  2. Deselect the Compress this drive to save disk space and click Apply under the General tab.
  3. Click OK when the confirmation dialogue occurs.

After going through this how-to article, you will compress the Windows 10 files and folders to free up disk space quickly.

How useful was this post?

Click on a star to rate it!

Average rating 4.8 / 5. Vote count: 14

No votes so far! Be the first to rate this post.

It’s one of the most popular and controversial file types in the world, but …

Thomas Wilburn – Oct 4, 2007 4:33 am UTC

reader comments

Share this story

  • Share on Facebook
  • Share on Twitter
  • Share on Reddit

From anonymity to ubiquity

Since its standardization in 1991, MP3 has gone from being a little-known portion of a video file format to the kind of ubiquity that most brands can only dream of having. It’s both widespread, with small players flying off the shelves, and controversial, dropping from the lips of politicians and advocates for all sides of the intellectual property debate.

But what is MP3? The usual explanations usually take one of two forms. The long version, available in technical papers, is written in jargon and filled with math. The short version, often used by newspapers and nontechnical periodicals, simply states that the process eliminates parts of sound not normally heard by the human ear. But this one-sentence description raises more questions than it answers for any reasonably tech-savvy reader: how does it find those unheard sounds, and how does it get rid of them? What’s the difference between the different bit rates and quality levels? If you’re anything like me, you’ve often wanted to know the mechanics of MP3, but not to the point of writing your own encoder.

This guide attempts to explain the process of MP3 compression in simple terms, without oversimplifying it. Although some parts have been omitted, like the details of stereo encoding schemes and in-depth file composition, it covers the basic theory of turning uncompressed sound files into compressed MP3. In order to tour the MP3 codec without getting overwhelmed by the technical minutiae, we’ll take a look at some of the background principles and legacy of MP3, then break the process down into analysis and compression before finally considering the impact that this humble format has had on digital audio.

Hear, hear

Depending on the number of concerts you’ve attended, your ears may be more or less healthy for your age. But even if they’re in perfect shape, human hearing is constrained by a number of limitations. At best, tests have usually shown that we can hear frequencies in a range between 20 to 20,000Hz. Our ears are also most sensitive between 2KHz and 5KHz, and they can detect changes between frequencies in increments of 2Hz—that’s the effective “resolution” of hearing. As the average person gets older or the delicate cells of the ear are damaged by loud noise, high-frequency perception is reduced. In fact, most adults (myself included) have trouble hearing above 16KHz.

And these are just the physical limitations of the human ear. Our brains also play a role in filtering and analyzing the signals sent by the auditory nerve. The science of how we perceive sound is called psychoacoustics, and it has discovered a number of useful auditory effects. For example, one of my favorites is the Haas effect, which states that two identical sounds arriving within 30-40ms of each other from different directions will be perceived as a single sound coming from the direction of the first. It’s often used in public address systems to reinforce the sound “from the stage,” even if the loudspeakers are located farther to the side. MP3, like many other lossy audio compression schemes, relies heavily on these kinds of psychoacoustic effects to work its magic. In particular, it exploits the phenomenon of frequency masking.

Imagine two sounds with similar frequency profiles—say at 100Hz and 110Hz—but with different volume levels. If played by itself, the weaker sound is perfectly audible, but only the stronger will be heard if both are played simultaneously. The process of covering one frequency with another close (but not identical) frequency is called “masking.” The degree to which frequencies can mask each other varies across the range of human hearing—our ears are less precise at the top and bottom of the audible spectrum. Loud transient signals (ones with very short duration) can also mask weaker signals for a short time, similar to the Haas effect. This type of masking is known as “temporal” masking and is also used in MP3 compression.


Something else to keep in mind while looking at the techniques of MP3 is that it continues a compression legacy that has influenced its design. MP3 actually stands for “MPEG-1 Audio Layer 3.” MPEG, in turn, stands for the Moving Pictures Expert Group, which created the standard. MPEG video (and its successors, MPEG-2 and MPEG-4) is used all around us—DVDs are a modified version of MPEG-2, as is your digital TV signal.

As Layer 3 of the MPEG-1 specification, there are obviously two previous audio layers before MP3, which did not catch on in the consumer market (few of us listen to MP2s at home). There are several features of MP3 which may seem to be pointlessly complicated or are implemented in more steps than would seem strictly necessary, and these are often holdovers from the old design. This legacy means that MP3 is not actually terribly elegant or streamlined.

Which is a great excuse for me as an author, honestly. So if you have trouble following the process laid out in this article, don’t blame me for a poor explanation. Blame Layer 2 instead.