Compressing Hard Drive

Usage of the specialized tools intended for dynamic compression of the information stored on the PC's hard drives enables you to use the available disk space more efficiently. In many cases, this allows you to solve the problem of storage space shortage without purchasing additional equipment.

Practically all PC users, even beginners, know very well that a PC's resources tend over time to become insufficient to be able to work comfortably, even in cases when they seem to be excessive at first. You are always short on resources! Sooner or later, everyone will encounter this problem.

Obviously, the level of initial redundancy of PC resources and the rate at which they become insufficient depend on initial conditions, such as the cost of purchasing the PC, the complexity level of the problems being solved, and the user's experience and competence.

Despite the fact that financial investments in your desktop or mobile computer can be rather significant, sooner or later the time will come when you'll be short of resources. When this happens you'll have to face a rather difficult problem, one preventing you from working efficiently and comfortably.

Certainly, the problem of resource shortage can be solved by upgrading your PC (which is a difficult task in itself) or even by purchasing a new PC. This, however, also involves significant expense, which most users can afford to do at the least a year or two after pervious purchases.

The consequences of these new expenses are headaches and a bad mood caused by searching for the optimal solution under conditions of limited financial resources. However, there is another way of solving the problem, one that may be rather attractive to experienced users.

The problem of the processor's, memory subsystem's or video adapter's insufficient performance quite often can be solved by careful and cautious overclocking.

Despite the fact that overclocking is generally recognized as a very powerful and efficient method of improving the PC's performance, one must admit that this method is not universal, and can't solve all problems related to resource shortage. This is especially true when dealing with hard disks, which are the most important components of modern PCs.

Unfortunately, overclocking won't help you to increase the hard disk space; you need to search for other ways of overcoming your disk space problem, at least until you purchase a newer hard drive, which, unfortunately, is more expensive.

Dynamic compression of information provides a common workaround for the problem of insufficient disk space. It allows you to increase the disk's free space significantly. What's more important, this can be done without additional financial expenditures on newer and more expensive devices.

Furthermore, taking into account the throughput of the interfaces being used (which is normally rather low), information compression, while slightly increasing the processor workload, can in certain cases even increase the overall performance of the system.

On the other hand, the built-in reliability mechanisms of the hard drives (implemented both at the software and hardware level), which are currently standard, provide a sufficient level of reliability and safety for storing information.

Compressing in Windows NT/2000

The NTFS file system (NT File System), providing the basis for modern, powerful operating systems, was developed a relatively long time ago. It was oriented towards the Windows NT operating system. However, it became widely accepted only after the release of the newer versions of Windows NT, such as Windows NT 4.0 and Windows 2000.

Among other technologies implemented in NTFS, efficient data compression deserves special mention. It is widely used and commonly recognized by most advanced users. NTFS provides the capabilities for compressing both whole volumes and individual files and folders, thus allowing you to significantly increase free disk space.

Quite often, it allows you to increase hard disks of several GB by hundreds of MB. More advanced hard disks of larger capacity can be compressed to save several dozens of GB. The user works with compressed data the same way as he or she would with normal (uncompressed) files or folders.

Furthermore, as the practice has shown, data compression has no negative impact on system performance. This is achieved thanks to the simplicity of the compression/decompression methods and the algorithms implemented in NTFS. Besides this, the NTFS file system itself is conveniently integrated into modern high-performance operating systems.

When evaluating and discussing NTFS functionality, it is necessary to point out that for several years before its arrival, the DriveSpace program was the only popular and well-known compression tool. The third version of this program — DriveSpace 3 — was the most widely used.

The DriveSpace program is included with Microsoft operating systems, starting with Windows 95 OSR2. If you want to use this program when running Windows 95, you need to install the Microsoft Plus! for Windows 95 software, which includes the DriveSpace program.

Notice, however, that despite its popularity, this program is neither included with Windows NT/2000, nor does Windows NT/2000 provide support for DriveSpace compression. Certainly, it is necessary to mention that DriveSpace has several limitations.

For example, this program allows you to compress only disks formatted for a FAT16 file system. Furthermore, it only allows you to compress the whole logical disk, and there is a disk space limitation: the compressed disk must not exceed 2 GB. Also, the disk space loss caused by the cluster size (32 KB) must not be neglected.

In contrast to FAT16, for which the DriveSpace program is intended, NTFS enables the user to compress individual files. The logical disk size limitation has also been practically removed (2 TB). The compression and decompression processes implemented in NTFS are also much easier, and run significantly faster.

When comparing the capabilities of the FAT and NTFS files systems, it is necessary to emphasize that the DriveSpace program stores compressed data within a single file. Because of this circumstance, the reliability of storing information compressed using DriveSpace is somewhat lower than that for data compressed using NTFS compression.

Thus, we can draw the conclusion that NTFS compression is preferable when it comes to such important characteristics as convenience, ease of use, working speed, and storage reliability. Some NTFS-specific features of file and folder compression deserve special mention:

  • Each file is compressed individually. Some files are compressed more efficiently than others

  • Files or folders moved or copied to compressed folders (directories) will be compressed automatically

  • Compressed files or folders moved or copied to uncompressed folders or volumes are automatically decompressed

  • Files or folders created in compressed folders or on compressed volumes (disks) are automatically compressed

  • Files or folders created in uncompressed folders or on uncompressed volumes are not compressed

Decompressing in Windows 2000

The process of decompressing previously compressed file system objects (files, folders, logical disks) is quite similar to the compression procedure, with one exception — instead of setting the compression attribute, here you need to clear it.

Windows NT 4.0 and Windows 2000 operating systems provide the command-line tool for compressing file system objects. This operation is done by issuing the compact command from the command prompt.

The syntax of this command is similar for both operating systems (the only difference is in the terms used: Windows NT 4.0 calls them directories, while Windows 2000 uses the word folders):

Examples illustrating the usage of this command in Windows 2000 are provided below.

  1. Starting the command in an uncompressed directory:

    G:\TEXT\BOOK\PROG\C\Builder\Documentation\>compact        Listing G:\TEXT\BOOK\PROG\C\Builder\Documentation\       New files added to this directory will not be compressed.        16874446 :  16874446 = 1.0 to 1   DG.PDF       14156631 :  14156631 = 1.0 to 1   QS.PDF        Of 2 files within 1 directories       0 are compressed and 2 are not compressed.       31 031 077 total bytes of data are stored in 31 031 077 bytes.       The compression ratio is 1.0 to 1.
  2. Compression — starting the command with the /c key:

    G:\TEXT\BOOK\PROG\C\Builder\Documentation\>compact /c        Setting the directory       G:\TEXT\BOOK\PROG\C\Builder\Documentation\ to compress new       files [OK]        Compressing files in G:\TEXT\BOOK\PROG\C\Builder\Documentation\        DG.PDF 16874446 : 8966144 = 1.9 to 1 [OK]       QS.PDF 14156631 : 2811904 = 5.0 to 1 [OK]        3 files within 2 directories were compressed.       31 031 077 total bytes of data are stored in 11 778 048       bytes.       The compression ratio is 2.6 to 1.
  3. Starting the compact tool in a directory containing compressed files:

    G:\TEXT\BOOK\PROG\C\Builder\Documentation\>compact        Listing G:\TEXT\BOOK\PROG\C\Builder\Documentation\       New files added to this directory will be compressed.        16874446 : 8968192 = 1.9 to 1 C DG.PDF        14156631 : 2811904 = 5.0 to 1 C QS.PDF        Of 2 files within 1 directories       2 are compressed and 0 are not compressed.       31 031 077 total bytes of data are stored in 11 778 048 bytes.       The compression ratio is 2,6 to 1.
  4. Decompression — starting the compact tool with the /u key:

    G:\TEXT\BOOK\PROG\C\Builder\Documentation\>compact /u        Setting the directory G:\TEXT\BOOK\PROG\C\Builder\Documentation\       not to compress new files [OK]       Uncompressing files in G:\TEXT\BOOK\PROG\C\Builder\Documentation\        DG.PDF [OK]       QS.PDF [OK]        3 files within 2 directories were uncompressed.