Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword or section
Like this
0 of .
Results for:
No results containing your search query
P. 1
Disk Compression and Tshooting

Disk Compression and Tshooting

|Views: 41|Likes:
Published by Drift Gee

More info:

Published by: Drift Gee on Feb 11, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





t is a weird fact of “PC life” that we never seem to have enough storage space. No mat-ter how large our hard drive is, or how many hard drives are in the system, just about allPC users find themselves removing files and applications at one time or another to makeroom for new software. Looking back, it is hard to imagine that 10MB and 20MB hard drives were once considered spacious; today, that much space would probably not evencover a single DOS game or application. For many years, overcoming storage limitations
Concepts of Compression
Disk space allocationData compressionThe compression systemFactors that affect compression
Before and After Compresion
Scan the disk for physical defectsDefragment the disk and check freespaceCheck the disk for file defectsCheck the memoryInstall the compression utilityCreate a bootable diskDBLSPACE.INIand DRVSPACE.INIfile settingsRemoving DOSDoublespace orDrivespace manually
Troubleshooting Compressed Drives
Troubleshooting Windows 95Drivespace
Troubleshooting DOSDoublespaceand Drivespace
Troubleshooting DOSstacker
Further Study
has meant replacing the hard drive with a larger model. Given the rate at which hard-drivetechnology is moving, a new drive generally doubles or triples a system’s available space.Although new drive hardware is remarkably inexpensive (typically around 8 cents per MB), the total bill for a 2.5GB to 5.0GB drive is a serious expense for PC owners.In the late 1980s and early 1990s, companies such as Stac and Microsoft developed analternative to hard drive swapping known as
disk compression
. Instead of an invasive pro-cedure to upgrade and re-configure a PC’s hardware, a software utility re-organizes thedrive using compression techniques that can allow a drive to safely store up to 100% or more than its rated capacity. For example, a properly compressed 100MB hard drivewould typically be able to offer 200MB or more of effective storage space. Since the ini-tial introduction of disk compression, its acceptance and popularity has soared, and com- pression is now quite commonplace on DOS and Windows platforms. As you canimagine, however, disk compression is not always flawless—the vast differences betweenPC designs and the software used on them virtually guarantee problems at some point.This chapter is intended to illustrate the factors that affect disk compression, and show youthe symptoms and solutions for a wide variety of compression problems.
Concepts of Compression
To understand some of the problems associated with disk compression, it is important thatyou be familiar with the basic concepts of compression, and how those concepts are im- plemented on a typical drive. Disk compression generally achieves its goals through twomeans: superior disk space allocation and an effective data compression algorithm.
The traditional DOS system of file allocation assigns disk space in terms of clusters (wherea cluster can be 4, 8, 16, or more sectors—each sector is 512 bytes long). The larger adrive is, the more sectors are used in each cluster. For example, a 2GB drive typically con-sumes 64 sectors in each cluster. Each cluster commits (512
64) 32768 bytes per clus-ter. Because the drive’s file allocation table (FAT) works in terms of clusters, a file thatonly takes 20 bytes, or 1000 bytes, or 20KB will still be given the entire cluster—eventhough much less than the full cluster might be needed. This is phenomenally wasteful of disk space (the total amount of waste on a disk is referred to as
 slack space
). Disk com- pression forms a barrier between the DOS file system and the drive. This “compressioninterface” simulates a FAT for the compressed drive, so the compressed drive also allo-cates space in terms of clusters, but now a compressed cluster can have a variable number of sectors, rather than a fixed number. That way, a file that only needs three sectors hasthree sectors assigned to the cluster. A file that needs eight sectors has eight sectors as-signed to its cluster, and so on.
Although disk compression remains widely used in today’s DOS and Windows 95 plat-forms, it seems to slowly be losing popularity because of the huge capacities and lowcosts of today’s hard drives.
 Now that the DOS limitations of file allocation have been overcome, the data that is stored in each sector is compressed as it is written to disk, then decompressed as it is read fromthe disk into memory. This is known as
on-the-fly compression
. That way, the programthat might ordinarily need 20 sectors on a disk can be compressed to only 10 sectors. Youcan start to see that this combination of “cluster packing” and compression offer some powerful tools for optimizing drive space.Data compression basically works by locating repetitive data in some given length of data,and replacing the repetitive data with a short representative data fragment (called a
).For example, consider any ordinary sentence. In uncompressed form, each text character would require one byte of disk space. On closer inspection, however, you can detect a sur- prising amount of repetition. In the last sentence alone, the letters “er” were used twice, theletters “on” were used three times, and the letters “tion” were used twice. You can probablyfind other repetitions as well. If each repetition were replaced by a one byte token, the over-all volume of data can be reduced—sometimes significantly. The key to data compressionis the ability to search sequences of data and replace repeated sequences with shorter tokens.The amount of compression then depends on the power of the search and replace algo-rithm. A more powerful algorithm can search larger amounts of data for larger repeatingsequences—replacing larger sequences results in better compression. Unfortunately,more powerful compression algorithms usually require larger commitments of CPU time,which slows down a disk’s operations. Of course, any token must be shorter than the se-quence it is replacing: otherwise, compression would be pointless. Microsoft’s Double-Space looks at data in 8KB blocks, so the chances of finding repetitive data sequences aremuch higher than that of a single sentence.The importance of repeating data sequences raises an important question. What happenswhen a data sequence does not repeat? This is a very real and common possibility in every-day operation. If a data stream has few repeating elements, it cannot be compressed verywell (if at all). For example, a graphic image (such as a screen shot) undergoes a certainamount of compression when the screen pixels are saved to a file. The .PCX file format usesan early form of compression called 
run-length encoding 
, which finds and removes repeat-ing pixels (a much faster and simpler process than looking for repeating pixel sequences).When a compression utility tries to compress that .PCX file, there might be little or no ef-fect on the file because many of the repeating sections have already been replaced with to-kens of their own. As a rule, remember that compression is only as good as the data it iscompressing. Highly repetitive data will be compressed much better than data with few or no repetitions. Table 12-1 illustrates some typical compression ratios for various file types.
At this point, you can see how compression is implemented on the system. Traditionally,DOS assigns a logical drive letter to each drive (such as drive C: for the first hard drive).When a compression system is installed on a PC, a portion of your drive is compressed into what is known as the
Compressed Volume File (CVF)
. The CVF effectively becomesthe compressed drive. It contains all compressed files, and it is treated by DOS as if itwere a separate logical drive. The drive that holds the CVF (e.g., your original C: drive)is known as the
host drive
. Because the vast majority of the drive will be compressed into

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->