Printer Friendly

Compression with Stacker and Doublespace.

No matter the size of your hard disk, it's probably full. Or pretty close to it. It wasn't too long ago when 40 megabytes of storage was considered more than adequate for everyone's needs. That day is long past. With software demanding ever-expanding numbers of megabytes, a hard drive with 80, 100, or even 200MB is not too big.

But that kind of extravagance comes with a price tag. If you're purchasing a new computer, there is no reason not to get at least a 120Mb hard drive; with an older 286 or even a 386sx, you might be tempted to forego the expense. But if you don't think you'll need a disk that big, think again. Programs designed to run under Windows consume disk space with a voracious appetite and even some DOS programs are hard disk hogs.

WordPerfect 5.1 for DOS needs a couple megs; Quattro Pro 4.0 for DOS eats up six; and Harvard Graphics 3.0 for DOS weighs in at an incredible 13MB for a full installation. And if you want to run OS/2 you can expect to allocate tens of megabytes of disk space just for the operating system.

Compressing Budgets

So where does that leave you if you're on a budget and you need that additional space? Fortunately, the last couple of years have seen development of high quality, safe on-the-fly compression programs. These programs work behind the scene squashing the files on your disk into much smaller sizes. It's common to double the amount of space available to your software, and the good news is that you can get another 40 or 80MB for less than $100.

Probably the best known on-the-fly compression program out there is Stacker from Stac Electronics [5993 Avenida Encinas, Carlsbad, CA 92008-9708, (800) 522-7822]. See Figure 1 for a sample screen. Others include SuperStor, Expanz! Plus, and Double-Disk. Stacker comes in two varieties, a software-only version and one that includes a coprocessor board designed to speed decompression times.

Released in November 1990, Stacker quickly set the mark for these kinds of programs. Version 3.0 hit the streets near the end of 1993, and can be found for less than $90. It's a bargain you shouldn't pass up.

Installing Stacker couldn't be easier. Insert the floppy disk, type SETUP, and the program takes over. Before you begin, the manual wisely recommends a total backup of your disk. Just in case. Having done that for version 2.0 and not needing it, I felt reasonably confident that I wouldn't need to do so and I didn't. Stacker performed beautifully. Before Stacker I had a mere 40MB of hard disk storage; it was doubled to 80 afterwards. I went from less than a megabyte of free space to about 25MB.

Lempel-Ziv Algorithm

So how does it work? All of these real-time compression programs owe their existence to the work of a couple of Israeli scientists, Abraham Lempel and Jacob Ziv. They published their compression algorithm in 1977, and it's now known as the Lempel-Ziv algorithm. Programs that utilize the Lempel-Ziv algorithm search a file for redundant character strings and when found replace these strings with a token. The token refers back to the original string so that when the file is decompressed the data is restored to its initial form.

Consider the phrase "red rover, red rover let Alexander come over." After compression it might look like the following: "red *ov**, * * l*t Al*xan** c*m* *." The tokens refer back to a previously discovered character string. The first one, the "r" in "rover" would be replaced with a pointer to the first character in the word "red."

The pointers take much less space to store than the original character, and in many cases, one token can refer to a string of characters. You can see this in the fourth token, which refers back to the word "red." Stacker has a patented data compression technique, Stacker LZS, that is based on the Lempel-Ziv algorithm.

Stacker works transparently to the user. Any file you store on your hard drive is automatically compressed, and any file you read is automatically decompressed. You will, however, notice a change in your free RAM. The price exacted by Stacker is approximately 45K. In a 386 or better computer, you can load this high, but for most 286 and all older machines, that's a pretty big chunk of lost RAM.

Stacker and DOS 5.0+

If you are still using a DOS version prior to 4.0 and are considering Stacker, also consider upgrading to DOS 5.0. Because Stacker doubles the space on your hard drive, on any drive larger than 20MB you will have more than the 32MB that DOS recognized in all versions through 3.3.

Stacker will take care of this for you by creating 32MB partitions, but in many cases you will want to have 40MB or more available in a single partition. For this, you will need DOS 4.0 or higher.

When you install Stacker, it reserves 1 megabyte that will remain uncompressed. Stacker uses this space for necessary DOS files, all the drivers specified in your CONFIG.SYS file, and your boot files. Every file on the remaining portion of your hard drive is compressed and stored in a special file called STACVOL.DSK, which is also called your Stacker drive.

Any remaining free space is also held in STACVOL.DSK. Unless you know that STACVOL.DSK is there, you'd never be aware of its existence since it's marked as a hidden system file, just like some of the boot files DOS uses when it brings up your computer.

Next, Stacker creates a logical drive to hold all the compressed data in STACVOL.DSK. A logical drive is assigned a letter and acts just like a real disk drive but doesn't necessarily have a physical counterpart. It's a bit of electronic sleight of hand that you can see by using the DOS SUBST command.

A Way To Fool DOS

Take one of your subdirectories, and at the DOS command prompt, enter SUBST F: C: [unkeyable]DIRECTORY[unkeyable]SUBDIRECTORY. This fools DOS into thinking that the subdirectory is now a disk drive with the letter you assigned. Stacker does something similar.

The new logical drive is twice as large as your hard drive, with a portion filled with the programs and data you had stored on the disk. If, for example, you had a 40MB drive with 37MB filled, the logical drive would have 78MB. Remember Stacker reserves 1MB for noncompressed files, leaving 39MB to be compressed. Double this and you get 78MB.

At this point, DOS assigns the logical drive the next available letter in sequence. In most cases, this would be D:, but if you have a RAM drive or a second hard drive it may be E: or F:, At this point, there are only a few files left on your C: drive; those necessary DOS boot files and STACVOL.DSK.

Since C: is nearly universally regarded as the hard disk DOS prompt, Stacker next switches drive letters. The compressed logical drive is assigned the name "C:" and the noncompressed reserved area on your hard drive assumes the identity of the logical drive. It's a neat trick.

It's All Done with Mirrors

Stacker does all this magic by inserting a couple of lines into your CONFIG.SYS file when it installs. If you look at it, you'll see these two lines (or something very similar):

DEVICE=C:[unkeyable]STACKER[unkeyable]STACKER.COM C:[unkeyable]STACVOL.DSK

DEVICE=C:[unkeyable]STACKER[unkeyable]SSWAP. COM C:[unkeyable]STACVOL.DSK/SYNC+

You really won't have to worry about all this, because Stacker takes care of it all for you.

If you want only to double the free space on your disk, you can tell Stacker to work only on this area. If you already have a partitioned drive, say, a 120Mb drive that is divided into three 40Mb partitions, Stacker will treat each partition as a drive to be compressed.

Because Stacker is working at all times, whenever a file is read or written, there might be some concern about the time it takes for these functions to be performed. On my 12.5Mhz 286, I have noticed no appreciable time difference in either starting programs, saving files, or reading data files. When using a computer processor, however, such concerns may be valid.

As a test, I ran Stacker on a four-year-old Toshiba 1200H laptop. The Toshiba uses an 8086 microprocessor and runs at about 9Mhz. There seemed to be a noticeable sluggishness, especially when the computer booted. Based upon my experience, if you want to use Stacker on a computer that runs at least as fast as a 286, you shouldn't have any problems relating to speed.

You may also be concerned about compatibility. Will your programs run correctly with Stacker running in the background? So far, I've had no problem with my most popular applications. One game, Kiloblaster, shareware from Epic MegaGames, refused to load properly, but WordPerfect, ACT!, Alpha4, and Procomm Plus all perform beautifully.

On the Fly Compression: DOS 6.0

By the time you read this, Microsoft's DOS 6.0 is probably shipping. It will incorporate many of Stacker's features. DoubleSpace, the DOS's new on-the-fly disk compression program, will work much like Stacker and reportedly will automatically convert a disk that has been compressed with Stacker. (Most real-time compression programs are incompatible with each other.) It remains to be seen how much Microsoft's moves will negatively impact Stac Electronics.

At one time, Stac and Microsoft were discussing a licensing arrangement that would have allowed Microsoft to use Stac's technology when designing its compressional algorithm.

Something happened on the way to the altar, however, and on January 25, 1993, Stac filed a patent-infringement suit against Microsoft. The suit alleges that Microsoft infringed Stac's patented compression technology when it designed DoubleSpace. Stac could conceivably seek an injunction preventing distribution of DOS 6.0, although this looks pretty doubtful as I write this in February. Stay tuned; this could be interesting.

Regardless of how the suit comes out, Stacker and DoubleSpace are proven technology now and will allow us users to get more out of our cramped hard disks. That's something to be grateful for in an age of ever-increasing software bloat.
COPYRIGHT 1993 Information Today, Inc.
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 1993 Gale, Cengage Learning. All rights reserved.

Article Details
Printer friendly Cite/link Email Feedback
Title Annotation:Special Section: Microcomputers; Software Review; Stac Electronics' Stacker and Microsoft Corp.'s Doublespace data compression programs
Author:Dykhuis, Randy
Publication:Computers in Libraries
Article Type:Evaluation
Date:May 1, 1993
Previous Article:Bulletin board systems: a nostalgic look back.
Next Article:Train8atWLN.COM invades Internet.

Terms of use | Privacy policy | Copyright © 2019 Farlex, Inc. | Feedback | For webmasters