Disk compression
Disk compression increases the amount of information that can be stored on a disk by automatically compressing and decompressing data as it is written to and read from it. A disk compression utility is software that provides disk compression by overriding the system's file access layer so that all programs participate in compression. When a program writes a file, the utility compresses the data before storage. When a program reads a file, the utility decompresses the stored data before providing it to the program.
Disk compression uses a single, normal file for storing the logical, user-visible files of a disk volume. This file tends to be relatively large and acts as a virtual drive. Typically, access to the compressed storage is via device driver. Similar utilities automatically compress and decompress each file instead of using a single, large file, but such a utility is not classified as disk compression.
Unlike a file compression utility which is generally interactive, a disk compression utility is noninteractive. This automatic behavior is sometimes described as on-the-fly, transparent, real-time and online.
Disk compression was popular especially in the early 1990s, when microcomputer hard disks were relatively small and rather expensive.
Such utilities tended to be a more economic means of having more disk space as opposed to buying a disk with more space. 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 lower cost per unit of space.
Use
To start using disk compression on an existing drive, the utility would follow steps like:- Create an empty, compressed, virtual drive.
- Transfer files from the host drive to the compressed drive except for certain system files such as the swap file.
- Increase the size of the compressed drive to accommodate files and allow empty space when complete.
- 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.
Considerations
; Data loss due to crosslinked files: 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 data loss during the transfer process.
; Boot drive accessibility may depend on another drive: 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. This was not normally an issue for solutions that came bundled with the operation systems unless booting foreign operating systems, as system utilities like SYS were modified to copy the compression drivers to boot disks by default, and the corresponding operation systems would also fall back to look for them on drives other than the boot disk if they couldn't be found there.
; Uninstall limited by host drive size: Uninstallation was problematic if the expanded size of data on the compressed disk was larger than the normal disk capacity.
; Accidentally deleting virtual drive file: Users did not always realize that the large file on the host drive contained the compressed drive. While it was usually hidden by the compression utility, users who did find the large file curious or suspicious were able to delete it which resulted in the loss of all the files stored in it.
Examples
Hardware-assisted
Some of the initial disk compression solutions used a coprocessor via driver software. Examples include:; Stacker: From Stac Electronics.
; Expanz!: From InfoChip Systems.
; DiskDoubler dd2000: From Datran Corporation.
Software only
As processor power increased over time, software-only solutions began to reach or even outperform the performance of hardware-assisted solutions. These utilities were third-party components, either bundled in an OS distribution or installed separately.; : From Sundog Software.
; Stacker: From Stac Electronics.
; : From Integrated Information Technology.
; SuperStor: From AddStor.
; : From Vertisoft Systems.
; DoubleSpace: Based, in part, on Vertisoft Systems' DoubleDisk.
; DriveSpace: DoubleSpace with a different compression algorithm.
; : from JAM Software, Kiev, Ukraine.
; DiskDoubler: From Salient Software.
; : From Data Becker.
Bundled
disk compression with a new computer appealed to both resellers and users. Resellers could claim more storage space, and users liked that they did not have to install or configure the software. Operating systems pre-installed on new computers with bundled disk compression included:; DR DOS 6.0 : Bundled with a custom version of SuperStor.
; PalmDOS 1.0 : Bundled with a DPMS-enabled version of SuperStor.
; MS-DOS 6.0 : Bundled with DoubleSpace.
; PC DOS 6.1 : While the original release did not include a disk compressor, a custom version of was included in a later release, also introducing the preload API in the PC DOS line.
; MS-DOS 6.2 : Bundled with an improved version of DoubleSpace.
; Novell DOS 7 : Bundled with a DPMS-enabled version of Stacker, which also supported compressed data exchange with remote NetWare and Personal NetWare 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 : Bundled with a disk compression component named .
; PC DOS 6.3 : Bundled with SuperStor/DS.
; MS-DOS 6.22 : Bundled with DriveSpace.
; PC DOS 7.0 : Bundled with Stacker 4.02.
; Windows 95 : Bundled with DriveSpace 2.
; Windows 95 OSR2 : Bundled with a stripped-down version of DriveSpace 3.
; Windows 95 Plus! : Bundled with the full version of DriveSpace 3.
; OpenDOS 7.01 : Bundled with Stacker 3.12.
; DR-DOS 7.02 : Bundled with Stacker 3.12. DR-DOS 7.02 also added support for DriveSpace
; PC DOS 2000 : Bundled with Stacker 4.02.
; Windows 98 : Bundled with DriveSpace 3.
; DR-DOS 7.03 : Bundled with Stacker 3.12.
; Windows 98 SE : Bundled with DriveSpace 3.
; PTS-DOS Pro 2000 : Bundled with.
Related
Notable software adjacent to disk compression includes:; Squeeze: Squeeze was a resident DOS file compressor for Lotus 1-2-3 and Lotus Symphony files.
; Squish Plus ROM : This special ROM chip contained a custom version of Squish Plus with only 36 KB footprint adapted for the HP Portable Plus.
; Double Tools for DoubleSpace: Double Tools enhances the functionality of the DoubleSpace utility bundled with MS-DOS 6.0.
; Multimedia Stacker : Multimedia Stacker bundled Stac's DPMS-enabled Stacker 4.01 with Helix Cloaking and utilities, utilizing Cloaking's built-in DPMS server to relocate and run in protected mode.
; THS filesystem : THS was a compressed file system driver for Linux which could read some compressed volume files.
; DMSDOS : DMSDOS was a Linux kernel driver to support the reading and writing of DoubleSpace, DriveSpace 2 & 3, and Stacker 3 & 4 volumes.
; NTFS compression: Windows includes support for compressing files and folders in an NTFS partition. As such, it has aspects of both file and disk compression.