Lesson 4: Managing NTFS Compression

NTFS compression enables you to compress files and folders. Compressed files and folders occupy less space on an NTFS-formatted volume than do regular files and folders, which means you can store more data on them. Each file and folder on an NTFS volume has a compression state of either compressed or uncompressed.


After this lesson, you will be able to

  • Manage disk compression
  • Compress and uncompress files and folders

Estimated lesson time: 10 minutes


Using Compressed Files and Folders

Compressed files can be read by and written to any Microsoft Windows-based or MS-DOS-based application without first being uncompressed by another program. When an application, such as Microsoft Word for Windows, or an operating system command, such as Copy, requests access to a compressed file, NTFS automatically uncompresses the file before making it available. When you close or explicitly save a file, NTFS compresses it again.

NTFS allocates disk space based on the uncompressed file size. If you copy a compressed file to an NTFS volume with enough space for the compressed file but not enough space for the uncompressed file, you might get an error message stating that there is not enough disk space for the file. The file will not be copied to the volume.

Compressing Files and Folders

You can set the compression state of folders and files, and you can change the color that is used to display compressed files and folders in Windows Explorer.

If you want to set the compression state of a folder or file, right-click the folder or file in Windows Explorer, click Properties, and then click the Advanced button. In the Advanced Attributes dialog box, select the Compress Contents To Save Disk Space check box, as shown in Figure 3.5. Click OK, and then click Apply in the Properties dialog box.

NOTE


NTFS encryption and compression are mutually exclusive. Therefore, if you select the Encrypt Contents To Secure Data check box, you can't compress the folder or file.

Figure 3.5 The Advanced Attributes dialog box

IMPORTANT


To change the compression state for a file or folder, you must have Write permission for that file or folder.

The compression state for a folder doesn't reflect the compression state of the files and subfolders in that folder. A folder can be compressed, yet all of the files in that folder can be uncompressed. Alternatively, an uncompressed folder can contain compressed files. When you compress a folder, Windows 2000 displays the Confirm Attribute Changes dialog box, which has the two options that are described in Table 3.8.

Table 3.8 Confirm Attribute Changes Dialog Box Options

Option Description
Apply Changes To This Folder Only Compresses only the folder that you have selected
Apply Changes To This Folder, Subfolder, And Files Compresses the folder and all subfolders and files contained in it now as well as any others that might be added to it in the future

NOTE


Windows 2000 doesn't support NTFS compression for cluster sizes larger than 4 KB because compression on large clusters causes performance degradation. If you select a larger cluster size when you format an NTFS volume, compression isn't available for that volume.

Selecting an Alternate Display Color for Compressed Files and Folders

Windows Explorer makes it easy for you to determine quickly whether a file or folder is compressed by allowing you to select a different display color for compressed files and folders. This allows you to distinguish them from uncompressed files and folders.

Follow these steps to set an alternative display color for compressed files and folders:

  1. In Windows Explorer, on the Tools menu, click Folder Options.
  2. On the View tab, select the Display Compressed Files And Folders With Alternate Color check box.

Copying and Moving Compressed Files and Folders

Specific rules determine whether the compression state of files and folders is retained when you copy or move them within and between NTFS and FAT volumes.

Figure 3.6 The effects of copying and moving compressed folders and files

The following list describes how Windows 2000 treats the compression state of a file or folder when you copy or move a compressed file or folder within or between NTFS volumes or between NTFS and FAT volumes.

  • Copying a file within an NTFS volume. When you copy a file within an NTFS volume (shown as A in Figure 3.6), the file inherits the compression state of the target folder. For example, if you copy a compressed file to an uncompressed folder, the file is automatically uncompressed.
  • Moving a file or folder within an NTFS volume. When you move a file or folder within an NTFS volume (shown as B in Figure 3.6), the file or folder retains its original compression state. For example, if you move a compressed file to an uncompressed folder, the file remains compressed.
  • Copying a file or folder between NTFS volumes. When you copy a file or folder between NTFS volumes (shown as C in Figure 3.6), the file or folder inherits the compression state of the target folder.
  • Moving a file or folder between NTFS volumes. When you move a file or folder between NTFS volumes (shown as C in Figure 3.6), the file or folder inherits the compression state of the target folder. Because Windows 2000 treats a move as a copy and then a delete, the files inherit the compression state of the target folder.
  • Moving or copying a file or folder to a FAT volume. Windows 2000 supports compression only for NTFS files. Because of this, when you move or copy a compressed NTFS file or folder to a FAT volume, Windows 2000 automatically uncompresses the file or folder.
  • Moving or copying a compressed file or folder to a floppy disk. When you move or copy a compressed NTFS file or folder to a floppy disk, Windows 2000 automatically uncompresses the file or folder.

NOTE


When you copy a compressed NTFS file, Windows 2000 uncompresses the file, copies the file, and then compresses the file again as a new file. This might cause system performance degradation.

Using NTFS Compression

The following is a list of best practices for using compression on NTFS volumes:

  • Because some file types compress more than others, select file types to compress based on the anticipated resulting file size. For example, because Windows bitmap files contain more redundant data than application executable files, this file type compresses to a smaller size. Bitmaps often compress to less than 50 percent of the original file size, whereas application files rarely compress to less than 75 percent of the original size.
  • Do not store compressed files, such as PKZIP files, in a compressed folder. Windows 2000 will attempt to compress these files, wasting system time and yielding no additional disk space.
  • To make it easier to locate compressed data, use a different display color for compressed folders and files.
  • Compress static data rather than data that changes frequently. Compressing and uncompressing files incurs some system overhead. By choosing to compress files that are infrequently accessed, you minimize the amount of system time that is dedicated to compression and uncompression activities.

Lesson Summary

In this lesson, you learned how to compress and uncompress files and folders on an NTFS volume. You learned that compressed files can be read by and written to any Microsoft Windows-based or MS-DOS-based application without first being uncompressed by another program. The Windows NTFS file system automatically uncompresses the file before making it available, and when you close or explicitly save a file, NTFS compresses it again.

You also learned how to change the color used to display compressed files and folders in Windows Explorer to distinguish them from uncompressed files and folders. You learned too that NTFS encryption and compression are mutually exclusive.

Finally, you learned about copying and moving compressed files. When you copy a file within an NTFS volume, the file inherits the compression state of the target folder. When you move a file or folder within an NTFS volume, the file or folder retains its original compression state. When you copy or move a file or folder between NTFS volumes, the file or folder inherits the compression state of the target folder. Finally, when you move or copy a compressed NTFS file or folder to a FAT volume or a floppy disk, Windows 2000 automatically uncompresses the file or folder.



MCSE Training Kit(c) Microsoft Windows 2000 Accelerated 2000
MCSE Training Kit(c) Microsoft Windows 2000 Accelerated 2000
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 244

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net