Hack 30. Get More Hard-Disk Space by Using NTFS Compression
The quickest and easiest way to give your system more room is to use XP's built-in compression scheme for NTFS disks. Here's how to use itand how to convert your existing disk to NTFS if it doesn't already use it.
If you need more hard-disk space, don't buy another hard disk right away. First, consider using NTFS (NT File System) compression, which can give significantly more hard-disk space by compressing all the files on your PC. NTFS's on-the-fly compression capabilities can shrink the size of individual files and folders, or entire drives. When you use it, the files or folders will be compressed when they're on your hard disk to save space, but they will be decompressed automatically when you use them, and then compressed again when stored on your hard disk. This means that, unlike with a compression program such as WinZip (http://www.winzip.com), you don't have to deal with decompressing as well as compressing files. You can also easily turn compression on and off.
Note that NTFS compression isn't available with a FAT32 filesystem, so if you have a FAT32 system you'll first have to convert to NTFS, as explained later in this hack. If you're not sure which filesystem your volume uses, right-click your volume in Explorer, choose Properties General, and look for the information next to File System.
How much disk space can you save by using NTFS compression? That depends largely on the kinds of files you have on your system. Bit-mapped graphics files are very compressible, so you'll save quite a bit of hard-disk space if you have many of them. Document files, such as Word files, are also reasonably compressible, while certain kinds of files, such as PDF (Adobe Acrobat) files, are barely compressible at all.
In tests on my own PC, I found that bit-mapped .tif graphics files were compressed by more than 80 percenta folder full of them shrunk from 295MB to 57MB. Word files shrunk by 66 percenta folder full of them shrunk from 131KB to 44KB. PDF files, by way of contrast, hardly compressed at all: a group of them shrunk by just more than 6 percent, from 5.59MB to 5.27MB.
When you use compression, you might notice a slight drop in system performance. There might be a slight lag when opening or closing files, depending on the speed of your system, because the files have to be decompressed for you to open them and compressed when you save them. With newer systems, though, you probably won't notice a lag. On my now-aging 1.8GHz desktop, for example, I don't see a difference between working with files that have been compressed and working with files that haven't been compressed.
You can use NTFS compression on individual files, folders, and entire disks. To use NTFS compression on a file or folder, right-click the file or folder in Windows Explorer and choose Properties General Advanced. Youll see the screen shown in Figure 3-20.
Figure 3-20. Enabling compression on files and folders to save hard-disk space
Check the box next to "Compress contents to save disk space," click OK, and click OK again when the Properties dialog box appears.
If you want to compress an entire drive, right-click it in Windows Explorer and choose Properties General "Compress drive to save disk space." You'll be asked for confirmation, and then every folder and file on the drive will be compressed, one after another. Depending on the size of the drive, the procedure can take several hours. You can continue to use XP while the compression takes place. During that time, however, you might be prompted to close a file you're working on so that XP can compress it.
By default, XP visually differentiates between compressed files and decompressed files; compressed files are shown in blue. If for some reason your compressed files aren't blue, and you want them to be, from Windows Explorer choose Tools Folder Options View, scroll down, and select the checkbox next to "Show encrypted or compressed NTFS files in color."
3.11.1. How Compressing Folders Affects Underlying Files
When you compress files in a folder, they are all, obviously, compressed. But things can get confusing when you mix compressed folders and decompressed folders on a hard disk, or when you have compressed files in decompressed folders and vice versa. What happens, for example, when you move a decompressed file into a compressed folder, or move a compressed file from a compressed folder into a decompressed folder? The possibilities can set your head spinning. Here are the rules that apply when you're mixing compressed and decompressed files and folders:
3.11.2. Checking How Much Disk Space NTFS Compression Saves
When you compress a file or folder, it doesn't appear that you're actually saving any disk space; when you view a file listing in Windows Explorer, the size of the compressed files will remain the same as they were before compression. In fact, though, the files have been compressed and space has been saved. Explorer reports on only the decompressed file size, not the compressed file size. To see the compressed size of a file or folder, right-click it in Windows Explorer and choose Properties General. You'll see two listings of the file size, one titled "Size" and the other titled "Size on disk." The "Size on disk" listing reports on the compressed size of the file, while the "Size" listing reports on the decompressed size, as shown in Figure 3-21.
Figure 3-21. Viewing the true size of a compressed file
3.11.3. When to Use Zip Files and When to Use NTFS Compression
Another way to gain extra space on your hard disk is to use XP's built-in zip capabilities. Zip is an industry standard for file compression, and it compresses files much more effectively than NTFS does. In tests, I found that zip compression shrunk graphics files twice as effectively as NTFS compressionthe resulting zip files were half the size of the NTFS-compressed files.
But that doesn't mean you should use zip compression all the time; there are times when using NTFS compression is a better bet. When files are zipped, for example, you can't open them in their application by double-clicking them. First you have to open the zip archive, and then double-click the file. As a general rule, zipped files are not as convenient to use and handle as NTFS-compressed files. The exception is that zip lets you archive a group of files into a single folder, which you can then send to others via email or on disk.
What does this mean? On a day-to-day basis, NTFS compression is a better bet for files you frequently use. However, there are a number of reasons to use zip files instead:
If you decide to use zip files, consider getting a copy of WinZip (http://www.winzip.com). It's easier to use than XP's built-in zip compression and offers many more features, including several levels of compression, built-in links to email, and much more.
3.11.4. Convert Your Hard Disk to NTFS
To use XP compression or encryption, you have to use NTFS. But if you instead have a previous filesystem, such as FAT32, you're not left outyou can convert it to NTFS. To convert a volume to NTFS, use XP's convert utility. To convert a volume to NTFS, at a command prompt, type:
convert d: /fs:ntfs
where d: is the volume you want to convert.
You can also use a number of parameters along with the utility:
This runs the utility in verbose mode, which provides information about the volume being converted.
3.11.5. Hacking the Hack
If you convert to NTFS, here's a Registry hack for increasing its performance. Whenever you view a directory on an NTFS volume, the filesystem updates the date and timestamp to show the last time the directory was accessed. If you have a very large NTFS volume, this continual updating process can slow system performance. To disable automatic updating, run the Registry Editor [Hack #83] and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentContolSet\Control\Filesystem. Look for NtfsDisableLastAccessUpdate. If it's not present, create it as a DWORD. Set the value to 1.