Disk compression
A disk compression software utility increases the amount of information that can be stored on a hard disk drive of given size. Unlike a file compression utility, which compresses only specified files—and which requires the user to designate the files to be compressed—an on-the-fly disk compression utility works automatically through resident software without the user needing to be aware of its existence. On-the-fly disk compression is therefore also known as transparent, real-time or online disk compression.
When information needs to be stored to the hard disk, the utility compresses the information. When information needs to be read, the utility decompresses the information. A disk compression utility overrides the standard operating system routines. Since all software applications access the hard disk using these routines, they continue to work after disk compression has been installed.
Disk compression utilities were popular especially in the early 1990s, when microcomputer hard disks were still relatively small. Hard drives were also rather expensive at the time, costing roughly 10 USD per megabyte. For the users who bought disk compression applications, the software proved to be in the short term a more economic means of acquiring more disk space as opposed to replacing their current drive with a larger one. A good disk compression utility could, on average, double the available space with negligible speed loss. Disk compression fell into disuse by the late 1990s, as advances in hard drive technology and manufacturing led to increased capacities and lower prices.
Common disk compression solutions
Standalone hardware
Some of the initial disk compression solutions were hardware-assisted and utilized add-on compressor/decompressor coprocessor cards in addition to a software driver. Known solutions include:- Stacker XT/8 and Stacker AT/16 from Stac Electronics
- Expanz! and Expanz! Plus from InfoChip Systems
- DiskDoubler dd2000 from Datran Corporation
- MRCI from Microsoft
Standalone software
- Squish and Squish Plus from Sundog Software
- Stacker from Stac Electronics
- XtraDrive from Integrated Information Technology
- SuperStor and SuperStor Pro from AddStor
- DoubleDisk and DoubleDisk Gold from Vertisoft Systems
- JAM from JAM Software, Kiev, Ukraine
- DiskDoubler from Salient Software
- Double Density from Data Becker
Bundled software
- DR DOS 6.0, from Digital Research, included a custom version of AddStor's SuperStor.
- PalmDOS 1.0, from Novell, included a DPMS-enabled version of SuperStor.
- MS-DOS 6.0, from Microsoft, included DoubleSpace, which was based in part on Vertisoft Systems' DoubleDisk. MS-DOS 6.0 introduced the so-called DOS preload API, an undocumented challenge-response type interface which allowed the disk compression software to be loaded automatically even before CONFIG.SYS was processed.
- PC DOS 6.1, from IBM, while the original release did not include a disk compressor, a custom version of SuperStor/DS was included in a later release, also introducing the preload API in the PC DOS line.
- MS-DOS 6.2, from Microsoft, included an improved version of DoubleSpace.
- Novell DOS 7, from Novell, included a DPMS-enabled version of Stacker 3.12 from Stac Electronics, which also supported compressed data exchange with remote NetWare and PNW servers also running Stacker in order to avoid unnecessary recompression when copying files. It also introduced support for the DOS 6 preload API in order to maintain compatibility with Microsoft's DoubleSpace in multi-boot scenarios. A similar mechanism was used to load the optional single- or multi-user SECURITY component.
- PTS-DOS Extended 6.4, from PhysTechSoft, included a disk compression component named Folder
- PC DOS 6.3, from IBM, included a version of SuperStor/DS.
- MS-DOS 6.22, from Microsoft, included DriveSpace, which was DoubleSpace with a different compression algorithm, after MS-DOS 6.21 had to ship without any disk compression software at all for legal reasons.
- PC DOS 7.0, from IBM, included a DPMS-enabled version of Stacker 4.02 from Stac Electronics.
- Windows 95, from Microsoft, included an updated version of DriveSpace 2.
- Windows 95 OSR2, from Microsoft, included a stripped-down version of DriveSpace 3.
- Windows 95 Plus!, from Microsoft, included the full version of DriveSpace 3.
- OpenDOS 7.01, from Caldera, included a DPMS-enabled version of Stacker 3.12.
- DR-DOS 7.02, from Caldera, included a DPMS-enabled version of Stacker 3.12. DR-DOS 7.02 also added support for Microsoft's DriveSpace.
- PC DOS 2000, from IBM, included a DPMS-enabled version of Stacker 4.02.
- Windows 98, from Microsoft, included the full version of DriveSpace 3.
- DR-DOS 7.03, from Caldera, included a DPMS-enabled version of Stacker 3.12.
- Windows 98 SE, from Microsoft, included the full version of DriveSpace 3.
- PTS-DOS Pro 2000, from Paragon Technology Software, included a disk compression component named DATACOMP.
Other solutions
- Squeeze, a resident DOS file compressor for Lotus 1-2-3 and Lotus Symphony files from Turner Hall Publishing
- Squish Plus ROM from Sundog Software, but distributed exclusively through Personalized Software, was a special ROM chip containing a custom version of Squish Plus with only 36 KB footprint adapted for the HP Portable Plus.
- Double Tools for DoubleSpace from Addstor was an add-on product, enhancing the functionality of the DoubleSpace bundled with MS-DOS 6.0.
- Multimedia Stacker from Helix Software was a bundle of Stac's DPMS-enabled Stacker 4.01 combined with Helix Cloaking and utilities, utilizing Cloaking's built-in DPMS server to relocate and run in protected mode.
- THS filesystem, a compressed file system driver for Linux, which could read some CVFs.
- DMSDOS, a Linux kernel driver, to support the reading and writing of DoubleSpace, DriveSpace 2 & 3, as well as Stacker 3 & 4 volumes.
Operation
Disk compression usually creates a single large file, which becomes a virtual hard drive. This is similar to how a single physical hard drive can be partitioned into multiple virtual drives. The compressed drive is accessed via a device driver.Compressing existing drives
All drives would initially be empty. The utility to create a drive would usually offer to "compress a current drive". This meant the utility would:- Create an empty compressed drive, stored on the existing drive.
- Transfer existing files on the old drive to the new compressed drive.
- Increase the size of the new compressed drive as necessary to accommodate more files and allow empty space when done.
- When all files were transferred, the drive letters would be swapped.
Compressing the boot drive
A device driver had to be loaded to access the compressed drive. A compressed drive C: required changes to the boot process as follows:- The System BIOS loads sector 0 of the first physical hard drive.
- The partition sector loads sector 0 of the bootable partition. In this case, it's the host drive.
- Host drive sector 0 loads the DOS BIOS Depending on the version, only the first few sectors of the file or the whole file may be loaded into memory. In the first case, the loaded stub contains another loader loading the remainder of the file from disk. In the case of DR-DOS, the BIOS is packed and will decompress itself through an embedded decompression routine.
- The DOS BIOS then loads the DOS kernel
- If the DOS supports the preload API, the DOS BIOS attempts to load a preloadable compression driver from the root of the host drive and attempts to communicate with it through the DOS preload API. If the driver responds as expected, the DOS BIOS will keep the driver, if not, it will get discarded. If kept and configured accordingly, drive letters may get swapped, so that the compressed drive becomes C:.
- The DOS BIOS starts CONFIG.SYS processing by looking for the file in the root of the boot drive. In the case of DR-DOS, DCONFIG.SYS takes precedence over CONFIG.SYS, if present.
- Compression drivers not loaded through the preload API may be loaded through DEVICE statements.
- Depending on configuration and if this hasn't happened already, drive letters may get swapped, so that the compressed drive becomes C:.
- Processing continues from compressed drive.
Performance impact
- Once compressed, there was less data to be stored.
- Disk accesses would often be batched together for efficiency.
Drawbacks
Some common drawbacks to using disk compression:- Not all compression utilities would confirm the absence of errors in the FAT file system before compressing a disk in place. Some errors, such as crosslinked files, could result in additional data loss during the transfer process.
- The compressed drive is only visible if the device driver is loaded and the compressed drive is mounted. A boot disk, for example, might not contain the driver.
- Uninstallation was problematic if the expanded size of data on the compressed disk was larger than the normal disk capacity.
- Users did not always realize that the large file on the host drive contained the compressed drive. While it was usually "hidden" by default, users who did find the large file curious or suspicious were able to delete it. This would normally result in data loss.