Survey of EXPAND/DECOMP utilities

If you look at old DOS and Windows software distribution disks, you may see a lot of files whose names have the last character replaced by a “_” character, or sometimes a “$” character. For example:

mplayer.ex_
mplayer.hl_
mplayer.re_
msacm.dl_
msacm.dr_
msadpcm.ac_
mscomstf.dl_
...

Many such files belong to a family of compressed file formats which, as far as I know, doesn’t have a good name. We could call the formats “Microsoft installation compression”, or something like that.

I’m trying to learn more about these formats, and the compression and decompression software that goes with them. It’s not as easy as I think it ought to be, considering how common they were. Some good information can be found in the libmspack project, but it’s not complete, and it’s not clear where the information came from.

For this post, I collected and tested a lot of versions of Microsoft’s decompression software, which is usually in the form of a single file named EXPAND.EXE or DECOMP.EXE.

I did not do a very exhaustive search for decompression utilities. I just wanted to get a feel for what’s out there. I found most of the files using DiscMaster, which makes it easy to find files of a given name. But it does have a significant limitation in this case, since most of the non-free Microsoft software isn’t there, and that’s an important place to look for such utilities.

About the formats

There are three top-level file formats:

  1. A format whose files start with “SZ “. I’ll call it “SZ” format. It uses Okumura’s LZSS compression, at least to a close approximation.
  2. A format whose files start with “SZDD”. I’ll call it “SZDD” format. It uses an incompatible variant of Okumura’s LZSS.
  3. A format whose files start with “KWAJ”. KWAJ format supports at least three different compression methods: “KWAJ:2” (Okumura’s LZSS), “KWAJ:3” (an uncommon LZ+Huffman format), and “KWAJ:4” (MS-ZIP). There are probably two more methods, KWAJ:0 and KWAJ:1, but I could not find anything that supports them.

The SZ format was probably the first one, but I don’t know the order in which SZDD and KWAJ appeared.

Scope of this survey

To keep this survey manageable, I limited it to…

  • DOS utilities only. There are also versions of these utilities for OS/2, 32-bit Windows, and 64-bit Windows. But I don’t have much to say about them at this time.
  • English-language utilities only.
  • Decompression utilities only. Utilities that only do compression are not evaluated.
  • Stand-alone decompression utilities only. Sometimes, decompression was integrated into an installer (e.g., SETUP.EXE, maybe related to Microsoft’s Setup Toolkit), but I’m not evaluating that.
  • SZ, SZDD, and KWAJ formats only. Some versions of EXPAND support other formats as well, such as CAB. That’s not part of this survey.

The files listed below are not necessarily pristine files made by Microsoft. They may have been modified by other people.

The survey

The Hash column is the first 8 characters of the MD5 hash of the executable file.

The Msg column is a reference to an item in the Messages section later in this post. It shows what the program does when you execute it with no parameters. Sometimes, you can get a different message by running the utility with a “/?” or “-?” parameter, but I didn’t track this.

The SZ/SZDD/K… columns tell whether decompressing that format is supported, or not. They do not tell what happens if it is not supported. In many cases, if a format is not supported, the utility will copy the file unchanged, instead of decompressing it. If you’re not paying attention, you might think it decompressed it.

HashSizeFilenameMsgSZSZDDK:2K:3K:4Remarks
4E042AC225563COMPRESS.EXE1Obscure compressor/decompressor, from a file named ACCSDBS.ZIP.
F7A6BAF022003UNPACK.EXE2From QuickBasic 4.50.
1E5A4FC617820DECOMP.EXE3Compressed with EXEPACK.
D80593B217820DECOMP.EXE
EXPAND.EXE
3Compressed with EXEPACK.
E4FE57DA18684EXPAND.EXE3Compressed with EXEPACK.
40CBED4914563EXPAND.EXE4
A001B3E016885EXPAND.EXE5
5554DAD218515EXPAND.EXE6
A1B7DA0B18377EXPAND.EXE6
1B18EE7114195EXPAND.EXE7
0B52393C14001EXPAND.EXE7
A340A2659895EXPAND.EXE7Same as 0B52393C, but compressed with LZEXE 0.90.
17C5DAA513353EXPAND.EXE7
6570564215285EXPAND.EXE8
7DF6541515285EXPAND.EXE9Identical to 65705642, except for the date.
320AEE2326097EXPAND.EXE5
917A703316129EXPAND.EXE5Compressed with PKLITE.
DA82D0B816378EXPAND.EXE10Compressed with PKLITE.
1167F2C339044DECOMP.EXE11Compressed with EXEPACK. From an MSDN 1996 CD.
1718788539044DECOMP.EXE12Compressed with EXEPACK. From Office 4.2.
FBC4337F39044DECOMP.EXE12Same as 17187885, but compressed with a different version of EXEPACK. From Office 4.3.

Oddities

E54B121618052EXPAND.EXESeems to be corrupt. While very similar to some of the other EXPAND utilities, it just hangs when I run it. The text “COMEXE” that appears in the file might be a clue.
D8452DC914263EXPAND.EXE13Doesn’t support any of the known formats. Found with a program named WinBatch, by Wilson WindowWare. Its compressed files don’t have any obvious identifying features. I couldn’t identify the compression scheme, though I didn’t try too hard.

Messages

(A number in the “Msg” column in the table above refers to one of the messages here.)

Msg 1

C:\EXPAND\4E042AC2>COMPRESS.EXE
A lzw 1 Compression Utility - Version 1.00 (C) Microsoft 1989

Usage:  compress command inFile [outFile] [size1 size2 ..]
        Where command is one of:

         e - compresses inFile into outFile.
         d - expands inFile into outFile.
         s - compresses and splits into files
             of given sizes, later files have digits appended to names
         q - computes compression without creating an output file

Msg 2

C:\EXPAND\F7A6BAF0>UNPACK.EXE

Microsoft (R) BASIC Unpack Utility  Version 1.10
Copyright (C) Microsoft Corporation, 1989-1990.  All rights reserved.

Usage: unpack compressed-file uncompressed-file

Msg 3

C:\EXPAND\1E5A4FC6>DECOMP.EXE
Microsoft (R) Char-Setup Toolkit Decompression Utility - Version 1.00
Copyright (c) Microsoft Corp 1989, 1990.  All rights reserved.

Usage:  decomp [-afq] srcFile [destFile]
         -a will append to the destination file, if it exists.
         -f will force overwriting if destination file exists.
            (Files can't be decompressed on top of themselves.)
         -q will calculate size of uncompressed file (no output).

         You can specify a directory instead of a filename for destFile.
         If you do not specify a filename for output, then a name will be
         constructed from the base and extension stored in the header,
         and/or the srcFile name if the header does not include filename
         information.

Msg 4

C:\EXPAND\40CBED49>EXPAND.EXE
Expands one or more compressed files.

EXPAND [drive:][path]filename [[drive1:][path1]filename[ ...]] destination

  [drive:][path]filename  Specifies the location and/or name of a file or
                          set of files to be expanded. You cannot use
                          wildcards.
  destination             Specifies the new location and/or name of an
                          expanded file or set of files. Destination can be
                          a drive letter and colon, directory name,
                          filename, or combination.

The destination can only be a filename if you have specified a single
filename for the source filename parameter. To expand multiple files to a
different directory and keep the original filenames, specify only a
directory as the destination.

Msg 5

C:\EXPAND\320AEE23>EXPAND.EXE

Type the location and name of the
compressed file you want to expand.
(Example: A:\EGA.SY_)

Compressed file:

Msg 6

C:\EXPAND\5554DAD2>EXPAND.EXE
Microsoft (R) File Expansion Utility  Version 1.00
Copyright (C) Microsoft Corp 1990.  All rights reserved.


USAGE: EXPAND [dir][drive]file1 [dir][drive]file2

Msg 7

C:\EXPAND\0B52393C>EXPAND.EXE
Microsoft (R) File Expansion Utility  Version 2.00
Copyright (C) Microsoft Corp 1990-1991.  All rights reserved.

No files specified.

Msg 8

C:\EXPAND\65705642>expand
Microsoft (R) File Expansion Utility  Version 2.00
Copyright (C) Microsoft Corp 1990-1991.  All rights reserved.

Enter the location and name of the compressed file to expand.
(Example: A:\HIMEM.SY_)

Compressed file:

Msg 9

C:\EXPAND\7DF65415>expand
Microsoft (R) File Expansion Utility  Version 2.00
Copyright (C) Microsoft Corp 1990-1992.  All rights reserved.

Enter the location and name of the compressed file to expand.
(Example: A:\HIMEM.SY_)

Compressed file:

Msg 10

C:\EXPAND\DA82D0B8>expand
Microsoft (R) File Expansion Utility  Version 2.10
Copyright (C) Microsoft Corp 1990-1993.  All rights reserved.

Enter the location and name of the compressed file to expand.
(Example: A:\HIMEM.SY_)

Compressed file:

Msg 11

C:\EXPAND\1167F2C3>DECOMP.EXE
Microsoft (R) Decompression Utility - Version 1.4
Copyright (c) Microsoft Corp 1989 - 1993.  All rights reserved.

Usage: decomp [-afq] [srcArg [destArg]]
   -a will append to the destination file, if it exists.
   -f will force overwriting if destination file exists.
      (Files cannot be decompressed in place.)
   -q will calculate size of uncompressed file (no output).

   srcArg can be a specific file or a wildcard pattern.  Either can be
   preceeded by a path.  destArg can be a specific file, a directory,
   or omitted.  In the last two cases, decomp will try to create a
   destination filename using information in the src file header
   or the src filename itself if the header is missing information.


    Enter the name and/or path for the compressed file:

Msg 12

C:\EXPAND\FBC4337F>DECOMP.EXE
Microsoft (R) Decompression Utility - Version 1.4
Copyright (c) Microsoft Corp 1989-1994.  All rights reserved.

Usage: decomp [-afq] [srcArg [destArg]]
   -a will append to the destination file, if it exists.
   -f will force overwriting if destination file exists.
      (Files cannot be decompressed in place.)
   -q will calculate size of uncompressed file (no output).

   srcArg can be a specific file or a wildcard pattern.  Either can be
   preceeded by a path.  destArg can be a specific file, a directory,
   or omitted.  In the last two cases, decomp will try to create a
   destination filename using information in the src file header
   or the src filename itself if the header is missing information.


    Enter the name and/or path for the compressed file:

Msg 13

EXPAND (c)1990 Microsoft Corporation.  All Rights Reserved

Usage:  EXPAND <file1> <file2>

<file1> : The fully qualified name of the compressed file,
          including drive and directory.

<file2> : The fully qualified name of the destination file,
          including drive and directory.

Fatal error opening files.

Concluding remarks

The lack of consistency among these utilities is notable. They support different sets of formats. They have different names, or no name. Their version numbers don’t mean much. They do different things if you run them without parameters. They do different things if a file has an unrecognized format.

Up to a point, it is understandable that newer EXPAND utilities don’t always support older formats. These utilities are from the floppy disk era, so they need to be as small as possible. Still, it’s disappointing that I couldn’t find a decompression utility that supports all the formats.

What about compression?

As mentioned earlier, I didn’t look for utilities that only do compression. They weren’t as widely distributed as the decompression utilities. An example of a compression utility is COMPRESS.EXE, sometimes included with Microsoft’s Setup Toolkit. One version of it prints the following message when you run it without parameters:

C:\EXPAND\05381B09>COMPRESS.EXE
Microsoft (R) File Compression Utility  Version 2.00
Copyright (C) Microsoft Corp. 1990-1992.  All rights reserved.

Enter the location and name of the source file to compress.
(Example: C:\WINDOWS\HIMEM.SYS)

Source file:

Modern Windows expand.exe

Modern versions of Windows, at least through Windows 10/11, still include an expand.exe utility. But of the formats discussed here, it appears to only supports SZDD.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s