Friday, June 13, 2008

File Compression

Monitoring, Managing, and Troubleshooting Access to Files and Folders

Even in this age of huge hard drives, there are often times when it would be convenient to compress some data. Whether you are zipping data with a software package you've purchased or running a file system based compression scheme, the idea is to maximize the amount of hard drive space you have available for other data. The first recommendation is to delete any unnecessary files on your drive (temp files, Internet cache, etc.), then make backups of your data that can be removed. If you have 100MB of scanned images, try to put them on a CD-ROM or zip disk to free up room. You may surprise yourself and free up so much room that you no longer require compression. However, in many cases you will still need to compress your data.

The good news is that Windows 2000 Professional supports file-level compression. You'll need to be running the NTFS file system, but other than that, compression is easy to set up.

The compression algorithm used in NTFS compression is very robust. It reduces the size of a text-based file by around 50 percent, and executables by around 40 percent. It is possible to realize a 40–50 percent gain in the effective size of your volume or drive when it is compressed.
Enabling File Compression

Compression is activated or disabled in two ways, either by using a GUI (My Computer or Windows Explorer) or with a command-line utility, compact.exe. To enable file compression using the graphical interface, perform the following steps:



  • From within My Computer or Windows Explorer, right-click a folder or file to be compressed.
  • From the context menu, select Properties.
  • A property sheet with several tabs will now appear. From the General Tab, Attributes, select the Advanced Attributes tab.
  • The Advanced Attributes tab has two sections, Archive and Index attributes in the top section, and Compress or Encrypt attributes in the bottom half. This last one is the one we're interested in Figure below.









  • Enabling or disabling compression is simple. Select the check box for compression to enable compression for this file, and clear it to disable compression.

  • After checking or unchecking the Compress contents to save disk space box, click Apply for the compression or decompression to take effect.

  • After either enabling or disabling compression, and depending upon the amount of data you've just compressed/decompressed, you'll notice that once you click Apply, your PC may become less responsive to foreground applications. This is normal; your machine has a lot of data to run its compression algorithm against. This selection is available for individual files, folders, and even entire drives, as long as they reside on NTFS partitions.

  • The below figure shows the Properties sheet for the Excel document again after compression. Notice the size on disk: 53K versus the original 129 K. This file was reduced to 40 percent of its original size.


No comments: