[Front] [Prev Chapter] [Next Chapter]

Chapter 12 Disk Compression

Before Compressing a Drive

Compressing a Drive

Converting DoubleSpace and SuperStor Drives

The Compression Process

Mounting and Unmounting Compressed Drives

Checking Compressed Drives

Viewing Stacker Information in MS Windows

Creating MS Windows Permanent Swap Files

Decompressing a Compressed Drive

Using a Compressed Diskette on a Computer Without Stacker


The Stacker* program allows you to increase the capacity of a disk so that there is more space available for your data and programs.

Stacker uses data compression. Compressing a file makes it use less space by eliminating repetitive pieces of information. After compressing the drive by running Stacker on it, you use it exactly as you did before running Stacker. Data, however, is automatically compressed when written to the drive and automatically decompressed when read back from the drive.

The amount by which a disk drive can be compressed depends on the type of files stored on it. Word processor files usually compress to half their original size, for example, while spreadsheet files compress even more. Programs and command files tend to compress less because they do not contain very much repetitive data.

This chapter describes the Stacker program and how to use it.

Warning: Never use the Stacker program on a Windows 95 computer.

Before Compressing a Drive

You should perform the following tasks before running the Stacker program.

Back Up the Contents of the Drive

Before making any changes to an entire disk drive, it is always a good idea to make a backup copy of its contents. Refer to the description of the FBX command in the ``Command Reference'' chapter of DOSBook for information about how to back up an entire disk drive.

Log Off the Network

If your computer is connected to the network, log off the network. You cannot compress network drives.

Remove Copy-Protected Software

If you have copy-protected software on the disk drive you want to compress, remove it; some copy-protected software may interfere with the compression process. You can replace the software on the disk drive after the compression process is finished. Refer to the documentation of specific applications for information about removing them from a disk and then replacing them again.

Exit Any Shell

Compression can only be done through the SETUP program under DOS. If you are using any other operating environment, such as MS Windows or GeoWorks*, exit from it before compressing a disk drive.

Check for Sufficient Free Space

The Stacker program requires working space on the disk drive being compressed. Make sure that there is at least 1 MB of free space on the drive. If you want to compress a bootable drive (usually drive C:), Stacker needs at least one percent of the total space plus an additional 45 KB of free space.

Compressing a Drive

You can compress any of the following:

You compress a disk drive using the SETUP program. Refer to Chapter 9, ``Configuring the System'' for general information about SETUP and how to use it.

After starting SETUP, do the following:

1. Choose Disk Compression from the main menu.

SETUP offers to reboot the computer to disable any software, such as TSRs and device drivers, that might interfere with the compression process.

2. Choose to reboot if you are aware of any such software.

It is recommended that you always choose to reboot.

SETUP displays a list of the disk drives currently available on your system, along with the type and capacity of each drive.

3. Select the drive you want to compress or cancel compression and return to the SETUP main menu.

When you choose a drive, SETUP displays the current status of the drive: the total amount of space and the amount of free space (in KB).

4. You can now choose to compress all of the data on the drive or to compress the free space only to create a new Stacker drive.

If you are compressing a diskette, the Stacker program will only compress a blank diskette; you cannot compress existing data on a diskette or any other type of removable drive.

Compressing the Entire Hard Disk Drive

Compressing the entire drive means that all existing data on the drive will be compressed. After the drive is compressed, there will be more free space.

1. Choose to compress the entire drive and SETUP displays a message that it is ready to begin compression. Then choose to begin compression or, if you have changed your mind, you can cancel compression and return to the SETUP main menu.

You see several different processes as the drive is compressed. They are as follows:

For a detailed description of how Stacker is working, refer to ``The Compression Process'' on page 12-6.

2. When compression is finished, you see the size of the stacked disk and the amount of free space, before and after compression.

3. If you choose to restart the operating system. SETUP reboots the computer and you can use all of your disk drives the same way you have always done.

The compressed drive is automatically mounted and available for use.

After compressing a drive and rebooting, you will also notice that an additional drive, using the next available drive letter, has been created. This is the uncompressed drive associated with the Stacker drive. For information about this drive and its function, refer to ``The Compression Process'' on page 12-6.

Creating a Compressed Drive From Free Space on a Hard Disk

Instead of compressing an entire hard disk drive, you can choose to use all the free space on the drive to create a new Stacker drive. You compress free space the same way you compress the entire drive; refer to ``Compressing the Entire Hard Disk Drive'' on page 12-4 for a description. The only differences are as follows:

Creating a Compressed Diskette

If you are compressing a diskette, you can only compress a blank diskette; you cannot compress any existing data. When you compress a diskette, all existing data will be deleted before the diskette is compressed. After the diskette is compressed, any new data written to it will automatically be compressed.

Instead of using SETUP, you can quickly compress a blank diskette by using the CREATE command at the system prompt. Refer to the ``Command Reference'' chapter of DOSBook for information about the syntax and function of the CREATE command.

Converting DoubleSpace and SuperStor Drives

If you have DoubleSpace or SuperStor compressed drives on your computer, SETUP can automatically convert these drives to Stacker drives.

SETUP automatically detects the presence of DoubleSpace or SuperStor drives when you choose Disk Compression from the main menu. When prompted, choose whether or not to convert all DoubleSpace and SuperStor drives to Stacker drives.

After converting drives via SETUP, it is a good idea to make sure your data is as safe as possible by recompressing your data using DISKOPT. The DISKOPT program includes an option to perform a full optimization and ``restack'' of the drive. For information about running DISKOPT, refer to Chapter 11, ``Improving Disk Performance.''

The Compression Process

When you are compressing existing data, the Stacker program works on an uncompressed disk drive as follows:

1. Stacker reserves a certain amount of space on the drive to remain uncompressed: 1 MB if the drive is bootable and 100 KB for any other drive. This uncompressed drive contains the files that need to remain uncompressed: IBMBIO.COM and IBMDOS.COM, for example, if the drive is bootable. The Stacker configuration file (STACKER.INI) and device driver (STACKER.BIN) are also stored in the uncompressed drive.

2. Stacker creates the STACVOL.DSK file to hold all the data on the drive. The STACVOL file fills the rest of the drive and will become the Stacker (compressed) drive.

3. Stacker compresses all the files on the drive and stores them in the STACVOL file.

4. Stacker creates a logical drive for the STACVOL file which is double the size of the file itself. The next available drive letter is used for the new logical drive.

5. Stacker switches drive letters so that you access the data on the compressed drive with the original drive letter, as you did before compression. Normally, only DOS needs to access the uncompressed drive.

When you are compressing the free space on a drive to create a new Stacker drive, the Stacker program works the same way except that it does not compress files and it does not create an uncompressed drive. The new Stacker drive (containing the STACVOL file) is mounted as the next available drive letter when you reboot the system.

Accessing Compressed Drives (STACKER.BIN and STACKER.INI)

The operating system needs information about how to access a compressed drive once it has been created.

When you run the Stacker program in SETUP, it copies the Stacker device driver, STACKER.BIN, to the root directory of your boot drive. STACKER.BIN remains uncompressed. It is loaded into memory at system startup before any device driver; other device drivers are loaded in CONFIG.SYS.

STACKER.BIN is configured specifically for your system. To do this, SETUP creates a hidden configuration file in the root directory of your boot drive called STACKER.INI, which sets the compression speed and defines STACVOL files as logical drives. Normally, you will not need to edit this file; SETUP creates and changes it automatically for you.

Mounting and Unmounting Compressed Drives

After the Stacker program is run on any of your disk drives, compressed drives are automatically mounted when you boot the system and available to use. You may, however, need to unmount a compressed disk to access the uncompressed drive. You will also need to unmount compressed diskettes before you can run the DOS DISKCOPY or FORMAT commands on them.

Unmount a compressed drive using the STACKER command at the system prompt. To mount a compressed drive, you can also use the STACKER command. Refer to the description of the STACKER command in the ``Command Reference'' chapter of DOSBook for more information.

Checking Compressed Drives

The Stacker program includes a way of checking the current status of your compressed drives, checking the integrity of those drives, and displaying information about them such as the compression ratio.

Displaying Drive Status

You can use the STACKER command at the system prompt to display a report on the status of each drive. Refer to the ``Command Reference'' chapter of DOSBook for information about the syntax and function of the STACKER command.

Checking Drive Performance and Usage

To check Stacker drive integrity, use the CHKDSK command. CHKDSK includes options that apply specifically to Stacker drives. Refer to the description of CHKDSK in the ``Command Reference'' chapter of DOSBook for more information.

Warning: Never use the DR-DOS CHKDSK utility on a Windows 95 computer, even under DR-DOS. Use the Windows 95 CHKDSK tool only.

Viewing Stacker Information in MS Windows

After you run Stacker, a Stacker pull-down menu is added to your File Manager the next time you go into MS Windows.

Choose one of the following from this menu:

If you choose File Info, you see the name, type of file, size of the file, and compression ratio for the files selected. The bottom left corner of the screen contains the Sort Order buttons. The bottom right corner of the screen displays Overall Info, including the actual compression ratio for the files selected as well as the total bytes contained in the file.

If you choose Disk Info, you see the KB used and free for the entire compressed drive plus the expected and actual compression ratios for that drive.

Creating MS Windows Permanent Swap Files

When you are running MS Windows in 386 Enhanced mode, it frees memory and speeds up performance by swapping information from memory to a ``swap file'' on your hard disk (virtual memory). You can display or change the swap file settings by using the standard MS Windows Virtual Memory dialog box but you will not be able to create a permanent swap file on a Stacker drive.

To be able to create a permanent swap file on a Stacker drive, you must display and change information about your system's virtual memory as follows:

1. In the Main group, choose the Control Panel icon.

2. In the Control Panel window, choose the Virtual Memory icon.

The Virtual Memory dialog box appears, which displays the current swap file settings.

3. Choose the <Change> button, to change the drive location, size, and type for the swap file.

The dialog box expands, enabling you change the settings. You can now select a Stacker drive to contain a permanent swap file. You cannot create a temporary swap file on a compressed drive, however.

For further information about MS Windows swap files, refer to the appropriate section of your MS Windows documentation.

Decompressing a Compressed Drive

On rare occasions, you may want to decompress all the data on a compressed drive. You can reverse the compression process by using the UNSTACK command.

NOTE: You cannot decompress a compressed diskette.

UNSTACK removes all the files from the compressed drive, decompresses them, places them back on the uncompressed drive it created when you originally compressed the drive, and deletes the STACVOL file. Refer to ``The Compression Process'' on page 12-6 for information about how Stacker compresses the drive.

Start decompressing a drive by typing the following at the system prompt, where d is the drive letter of the compressed drive:

UNSTACK d: <Enter>
You see a display that shows the progress made so far in decompressing the drive.

Before it starts decompressing, Stacker checks to make sure all the data will fit on the uncompressed drive. If they will not fit, you are informed and Stacker indicates how much additional space is required. Delete enough files or move them to another disk drive before running UNSTACK again.

The UNSTACK display will also prompt you twice before proceeding to decompress the drive; this is a safety precaution.

Using a Compressed Diskette on a Computer Without Stacker

When you use a compressed diskette on a computer on which the Stacker program has been installed, the compressed diskette is automatically mounted. If you want to use a compressed diskette on a computer on which Stacker has not been run, however, you will need to manually mount the diskette and make it available for use.

An unmounted Stacker drive contains the following files only:

To make the compressed drive available on a non-Stacker computer, simply run STACKER by typing the following at the system prompt, where d is the drive letter of the compressed drive:

STACKER d: <Enter>
If you need to unmount the compressed drive, type the following at the system prompt:

EXIT <Enter>


[Front] [Prev Chapter] [Next Chapter]

info@caldera.com
Copyright © 1993, 1997, 1998 Caldera, Inc. All rights reserved.