21.2. Compressing Files and Folders: All Versions
made these days have greater
than ever, but programs and files are much bigger, too. Running out of disk space is still a common problem. Fortunately, Vista is
effective at compressing files and folders to take up less disk space.
Compressing files and folders can also be useful when you want to email files to someone without dooming them to an all-night modem-watching session. That's why Microsoft has endowed Windows Vista with two different schemes for compressing files and folders:
for storing files on your hard drive, and
for files that might have to be transferred.
UP TO SPEED
is the process of replacing repetitive material in a file with shorthand symbols. For example, if a speech you've written contains the phrase
21 times, a compression scheme like the one in NTFS may replace each occurrence with a single symbol, making the file that much smaller. When you reopen the file later, the operating system almost instantaneously
the original, expanded material.
The degree to which a file can be compressed depends on what kind of data the file contains and whether it's already been compressed by another program. For example, programs (executable files) often shrink by half when compressed. Bitmapped graphics like TIFF files squish down to as little as one-seventh their original
, saving a great deal more space.
The PNG and JPEG graphics files so popular on the Web, however, are already compressed (which is why they're so popularthey take relatively little time to download). As a result, they don't get much smaller if you try to compress them manually. That's one of the main rules of data compression: data can only be compressed once.
In short, there's no way to predict just how much disk space you'll save by using NTFS compression on your drives. It all depends on what you have stored there.
21.2.1. NTFS Compression
If Windows Vista was installed on your PC when you bought it, or if you upgraded your PC from Windows XP, or if you erased your hard drive before installing Windows Vista, then your hard drive is probably formatted using a file system called
NT file system)
Most people can live a long and happy life without knowing anything about NTFS. If you work in a corporation, you might be grateful for the additional security it offers to Windows Vista fans (Chapter 23), and leave it at that. Now and then, however, you'll read about other features that are available
if your hard drive was prepared using NTFSand this is one of those cases.
The hard drive that's running Vista has the NTFS format; Vista requires it. To find out what formatting some other drive uses (a flash drive or external hard drive, for example), choose Start
Computer. Right-click the hard drive icon; from the shortcut menu, choose Properties. In the resulting dialog box, youll see either "File system: NTFS" or "File system: FAT 32." Unfortunately, special NTFS features like automatic compression aren't available to you unless you upgrade the drive formatting to NTFS. For instructions, download the free appendix to this chapter from this book's "Missing CD" page at www.missingmanuals.com. The file is called NTFS Upgrade.PDF. (Note, however, that if you convert a flash drive to NTFS, you may no longer be able to use it with non-Windows computers and devices like digital
The NTFS compression scheme is especially likable because it's completely invisible to you. Windows automatically compresses and decompresses your files, almost instantaneously. At some point, you may even forget you've turned it on. Consider:
a compressed file, Windows quickly and
expands it to its original form so that you can read or edit it. When you close the file again, Windows instantly recompresses it.
If you send compressed files via email or copy them to a PC whose hard drive doesn't use NTFS compression, Windows Vista once again decompresses them, quickly and invisibly.
Any file you copy into a compressed folder or disk is compressed automatically. (If you only
it into such a folder from elsewhere on the disk, however, it stays compressed or uncompressedwhichever it was originally.)
188.8.131.52. Compressing files, folders, or disks
To turn on NTFS compression, right-click the icon for the file, folder, or disk whose contents you want to shrink. Choose Properties from the shortcut menu. Click the Advanced button, and in the resulting dialog box,
on "Compress contents to save disk space" (Figure 21-5), click OK and then click Apply or OK when you return to the Properties dialog box. If you have selected a folder for compression, you're prompted as to whether you also want to compress the files and
If you don't see the "Compress contents to save disk space" checkbox (highlighted here), then your hard drive probably doesn't use the NTFS formatting scheme
wind up turning on compression for the entire hard drive. It can take Windows Vista several hours to perform the initial compression of every file on the drive.
If you do this, or even if you try to compress a large folder such as
, you will invariably run into a few files that can't be compressed because they're currently in use. Short of opening up the Task Manager and shutting down nearly every process on your system (not recommended), you won't be able to avoid a few of these. Your best bet is to select Ignore All the first time Windows Vista notifies you about this problem. Then you can safely walk away from your computer and let the compression continue.
When Windows is finished compressing, the compressed file and folder icons appear in a different color, a reminder that Windows is doing its part to maximize your disk space. (If they don't change color, then somebodymaybe youmust have turned off the "Show encrypted or compressed NTFS files in
" option described on page 85.)
When you look at the Properties dialog box for a compressed file (right-click the file and choose Properties from the shortcut menu), you can see two file sizes. The Size value indicates the actual (uncompressed) size of the file, while the Size On Disk value is the compressed size of the filethat is, the amount of disk space it's occupying.
21.2.2. Zipped Folders
As noted above, NTFS compression is great for freeing up disk space while you're working at your PC. But when you email your files to somebody else or burn them to a CD, Windows Vista always decompresses them back to their original sizes first.
Fortunately, there's another way to compress files: Zip them. If you've ever used Windows before, you've probably
Zip files. Each one is a tiny little suitcase, an
, whose contents have been tightly compressed to keep files together, to save space, and to transfer them online faster (see Figure 21-6). Use Zip files when you want to email something to someone, or when you want to pack up a completed project and remove it from your hard drive to free up space.
Top: A Zip archive looks like an ordinary folderexcept for the tiny
Bottom: Double-click one to open its window and see what's inside. Notice (in the Ratio column) that JPEG graphics and PNG graphics usually don't become much smaller than they were before zipping, since they're already compressed formats. But word processing files, program files, and other file types undergo quite a bit of
184.108.40.206. Creating zipped folders
In Vista, you don't even need a shareware program like PKZip or WinZip to create or open Zip files. You can create a Zip archive in either of two ways:
The Zip archive format was developed in the late 1980s by Phil Katz, a pioneer of PC compression technology. Katz's original product, PKZip, was a DOS-based archiving program that soon became an industry standard.
There have been many other archive compression standards over the
, but none of them became as ubiquitous as the Zip format. Every program today that creates or manipulates Zip files, including Windows Vista, owes a debt of thanksif not a free T-shirt or twoto Phil Katz.
Right-click any blank spot on the desktop or an open window. From the shortcut menu, choose New
Compressed (zipped) Folder. Type a
for your newly created, empty archive, and then press Enter.
Now, each time you drag a file or folder onto the archive's icon (or into its open window), Windows automatically stuffs a
of it inside.
Of course, you haven't actually saved any disk space, since now you have two copies of the original material (one zipped, one untouched). If you'd rather
a file or folder into the archivein the process deleting the
version and saving disk spaceright-drag the file or folder icon onto the
icon. Now from the shortcut menu, choose Move Here.
To turn an existing file or folder
a zipped archive, right-click its icon. (To zip up a handful of icons, select them first, then right-click any
of them.) Now, from the shortcut menu, choose Send To
Compressed (zipped) Folder. Youve just created a new archive folder
the files or folders into it.
At this point, you can right-click the zipped folder's icon and choose Send To
Mail Recipient. Vista automatically whips open your email program, creates an outgoing message ready for you to address, and attaches the zipped file to itwhich is now set for transport.
220.127.116.11. Working with zipped folders
In many respects, a zipped folder behaves just like any ordinary folder, in that you double-click it to see what's inside.
If you double-click one of the
you find inside, however, Vista opens up a
copy of itthat is, a copy you can view, but not edit. To make changes to a read-only copy, you must use the File
Save As command and save it somewhere else on your hard drive.
Be sure to navigate to the desktop or the Documents folder, for example, before you save your edited document. Otherwise, Windows saves it into an invisible temporary folder, where you may never see it again.
To decompress only some of the icons in a zipped folder, just drag them out of the archive window; they instantly spring back to their original sizes. To decompress the entire archive, right-click its icon and choose Extract All from the shortcut menu (or, if its window is already open, click the "Extract all files" link on the toolbar). A wizard asks you to specify where you want the resulting files to wind up.