There are several different ways that files can be compressed on the hard disk. I am
referring here to the logical mechanisms for performing the compression and decompression,
and not the compression algorithm itself. There are in fact many different compression
algorithms, but the details of how the compression is actually done are hidden entirely
from the user.
There are three main ways that compression is implemented on PCs:
- Utility-Based File Compression: A very popular form of disk compression, used by
virtually every PC user whether they realize it or not, is file-by-file compression using
a compression utility. With this type of compression, a specific utility is used to
compress one or more files into a compressed file (often called an archive), and
another similar utility is used to decompress the compressed file. The operating system
knows nothing about the compression; to it the compressed file is, just another file. In
order to use the compressed file at all, it must be decompressed. The most popular
compression system of this sort is the wildly popular PKZIP package, and its derivatives
such as WinZip. Virtually all software or large files that you download from the Internet
for example, uses some form of this compression.
- Operating System File Compression: While not supported by the FAT file system
used by DOS and most versions of Windows, some operating systems support the compression
of files on an individual basis within the operating system itself. For example, Windows
NT supports this feature when you use the NTFS file system. This is in many ways the best
type of compression, because it is both automatic (decompression is done by the operating
system when the file is needed by any program) and it allows full control over which types
of files are compressed.
- Volume Compression: Distinctly different than compressing individual files, it is
also possible with most newer operating systems to create entire disk volumes that are
compressed. This can be done either through utilities provided with the operating system,
or third-party packages. Volume compression allows you to save disk space without having
to individually compress files. Every file that is copied to the compressed volume is
automatically compressed, and each file is automatically decompressed when any software
program needs it. Volume compression is transparent to the use and generally works well on
most PCs.
Of these types of compression, utility-based file compression is common but relatively
straight-forward; you use a program to create a compressed file and another to look at it.
From the operating system's perspective, the compressed files and the utilities that use
it are just like any other files and programs on the disk, no different than say, a word
processor and a word processing document file. Volume compression, on the other hand, is
commonly used and has more complicating factors involved in its usage. In particular,
there are performance considerations and safety and compatibility issues that need
to be carefully weighed before using volume compression.
Next: Volume Compression Operation