NTFS Disk / File Compression in Windows XP Professional
January 18, 2004

The compression discussed in this guide is present in Windows XP Professional only.  It is not available in Windows XP Home.

Remember the old school hard disk compression schemes back in the day?  There were complicated programs to compress your hard drive, and the CPU's were so slow that anytime you wanted to compress or decompress a file, it would take forever.  These days, hard drives are so inexpensive that when people run out of space, people tend to simply buy more space.  Nobody really thinks about file compression anymore.  Well, why am I writing about it then?  A couple of reasons. 

  • CPU's have gotten so fast that the time to compress and decompress most files on the fly is fairly low.
  • It is free compared to buying a new hard drive.
  • Windows XP Professional makes compression extremely easy and almost invisible.
  • Drive compression may or may not be for you, but take a look and see what you think.
Windows XP Professional allows you to compress files, folders, or entire drives.  It's setup so that you don't have to change any of your work habits.  When you transfer a file to a hard drive that is compressed, it is compressed on the fly and then written to the drive.  If you read a file from a compressed hard drive, it is decompressed on the fly and then you can work with it.  Now mind you, working with file compression is always going to be slower than working with none compressed files since it takes CPU time to compress/decompress.  But when you think about it, many of the files we work with are already in compressed format, for example, JPEG and MPEG files are compressed files and decompress when you access them.

The amount that you'll be able to compress your hard drive depends significantly on the file types you are using.  If you have tons of MP3's then compression is useless and will waste your time since Windows XP will spend a lot of CPU time trying to compress a file that is already compressed and can't be shrunk any more.  However, if you have a drive full of Word or Powerpoint files, you can possibly compress those files up to 80%.

Good candidates for compression:

  • Files that are not natively compressed: text files, documents, programs
  • Files that are not frequently used
Bad candidates for compression:
  • Files that are already compressed: MP3's, video files, ZIP files, installation programs
  • Files that are accessed frequently
  • Files that need to be read and written to the hard drive as quickly as possible, such as video capture, video editing.
Hardware wise, the hard drive that you want to compress must be formatted in NTFS.  Also, you should have a relatively fast CPU so that the compression/decompression on the fly doesn't take too much time.

If you think compression is for you, give it a shot.  Reversing it is easy.

Let's do it.

Open up "My Computer".  Right click on the hard drive you want to compress and select "Properties".


At the bottom, check the "Compress drive to save disk space box".

Now click "Apply".  You'll be asked if you want to compress just the files in the root drive or all the folders and sub directories.  Pick the second one which is "Apply changes to D:\, sub folders and files".  Click "OK".  If you have files in the drive already, it will take some time to compress all the files.  It is probably a good idea to compress the drive while it is still empty.


Click "OK" until the windows are closed.  When you go to "My Computer", you'll see that the drive you just compressed is now in blue.  That's just for you to remember that it is compressed.


When you add files to the compressed drive, the files are compressed on the fly and then written to disk.  When you read files from a compressed disk, they are read from disk, and then decompressed on the fly.  This compression/decompression takes CPU time and may be fairly noticeable if you do a lot of file transfers.

The amount of space you gain is dependent on the file types you are working with.  Here is a small test to see the different compression ratios I get. 

In the "Test" directory, I have various programs, documents, and random stuff.  You can see that the size of the folder is 42.5 MB.  The size on disk (compressed size) is 18.8 MB.  Not bad.


In the next directory, I have all MP3's.  The size of the folder is 51.7 MB.  The size on disk (compressed size) is 51.4 MB.  There is virtually no compression in this case.  This is because MP3's files are already very compressed and there isn't much room to squeeze them down any further.


Based on this, you should pay attention to the type of data you are going to store on this compressed drive.  If you have a ton of MP3's that you want to back up, a compressed drive isn't a good idea, you'll simply waste compression and decompression time.  The same is true for compressed images such as large JPEG's.  Almost all other non compressed file type is fair game on a compressed drive.

If you ever choose to decompress the drive, all you have to do is uncheck the box "Compress drive to save disk space".  You'll have to be careful about the amount of data you have on the drive since the decompressed size might be larger than the disk itself.

Step by Step Menu