Summary compression

Requirements

bulletCompression can only be set on NTFS-volumes.
bulletWindows 2000 does not support DriveSpace, Double Space etc.
bulletEncrypted files cannot be compressed.
bulletThe pagefile cannot be compressed.
bulletThe maximum cluster size allowed for compression is 4,096 bytes. Otherwise the message 'File system does not support encryption' will appear.

Explorer

Files can be compressed via the Explorer. Select the file/folder and it's properties. Press the Advanced button on the General-tab and (un)select 'Compress contents to save disk space'. After pressing the Ok-button when compressing a folder, you will be asked to compress only this folder and files or also the sub folders and files.

Use Tools, Folder options to display compressed files and folders in a different color. The default color is blue. This color can be changed in the registry. (or via TweakUI)

Compact.exe

Files can also be compressed by using compact.exe. Compact utility options :

bullet/c Compresses the specified folder or file. (incl. hidden- and systemfiles)
bullet/u Uncompresses the specified folder or file. (incl. hidden- and systemfiles)
bullet/s[:\DirName] applies the action to all subfolders of the specified folder, or to the current folder if none is specified. If :\DirName is used, the folder attribute is not altered.
bullet/i Ignores errors.
bullet/f Forces the action on files that are already compressed.
bullet/a Display files with the hidden- and/or system attribute. 
bullet/q Displays minimal information. 

Performance issues

Compression runs more efficiently under Windows 2000 Professional than Windows 2000 Server. Heavily loaded folders with lots of write-traffic should not be compressed. Servers that mostly read data will not experience significant performance degradation. Programs that use transaction logging and constantly write to a database or log should not store their files on a compressed volume. as it can produce "dirty" pages faster than the mapped writer can write them.

Microsoft does not recommend that user's home folders and roaming profiles be placed on a volume that is using NTFS compression because of the large number of reads and writes performed.

NTFS uses the Lempel_Ziv compression scheme.

Offline files

Manually compressing the Offline Files cache\database (the %SystemRoot%\CSC folder) works, and files currently stored in the cache are compressed, but newly cached files are not stored in compressed format and previously compressed files become uncompressed after synchronization.

Offline file compression is not supported. Windows 2000 writes files in uncompressed format even if the folder is marked for compression. Marking the CSC (Client Side Caching) folder to be compressed and leaving it this way can cause a variety of complications ranging from caching update problems to Windows 2000 not responding while attempting to access files residing within the cache.

Copying/Moving files

If a file is moved within the same partition, the compression-attributed is kept. (independent of the directory to which the file is copied) If a file is copied or moved to another partition, it takes of the compression attribute from the folder it is moved or copied to.

More information

Related white papers 

bulletEnterprise class storage

Links

bulletMore information about Lempel-Ziv compression

Search Windows 2000 knowledge base (on title)

bulletSearch for 'compress' in knowledge base
bulletSearch for 'compression' in knowledge base

Last update : 9 October 2000