MS-DOS 6.22 Setup File Compression Utility

This article explains the compression tool used to prepare installation files on the original setup media of MS-DOS 6.22. It covers the specific utility responsible for packing the files, how the naming convention indicates compression, the underlying algorithm used, and the corresponding tool needed to decompress them.

The utility used to compress setup files on the original MS-DOS 6.22 distribution media is COMPRESS.EXE. Microsoft used this internal command-line tool across several operating systems and applications throughout the 1990s to fit operating system files onto standard 1.44 MB and 1.2 MB floppy disks.

File Naming Convention

Files compressed using COMPRESS.EXE are easily identified by a trailing underscore (_) in their file extension. During the compression process, the last character of the original file extension is replaced with an underscore. For example:

  • COMMAND.COM becomes COMMAND.CO_
  • FORMAT.COM becomes FORMAT.CO_
  • HIMEM.SYS becomes HIMEM.SY_
  • SETUP.EXE becomes SETUP.EX_

Compression Mechanism and Header

Files processed by COMPRESS.EXE utilize a proprietary variant of Lempel-Ziv compression (LZ77). These files contain a specific 14-byte binary header beginning with the magic bytes SZDD (hexadecimal 53 5A 44 44). This header stores critical metadata, including the compression format, the original file extension character that was replaced by the underscore, and the uncompressed file size.

Availability and Decompression

While the decompression utility, EXPAND.EXE, was included directly on the retail MS-DOS 6.22 installation media to allow users and the SETUP.EXE program to unpack files, COMPRESS.EXE was not included on the standard retail disks. Instead, Microsoft distributed COMPRESS.EXE through developer tools, such as the Microsoft Windows Software Development Kit (SDK), Driver Development Kits (DDK), and Microsoft Resource Kits.

To compress a file for custom deployment or installation media using the utility, the command-line syntax is:

COMPRESS -r SOURCE.EXT [DESTINATION]

The -r switch automatically applies the trailing underscore naming convention to the output file. To manually unpack any file created by COMPRESS.EXE, users run the standard DOS EXPAND command:

EXPAND FILENAME.EX_ FILENAME.EXE