David Schlachter

Expanding MS-DOS SZDD archives on macOS

April 10, 2019

A DOS emulator can be used to expand an SZDD archive on macOS, as well as on Linux, BSD, and other operating systems. SZDD archives are created with COMPRESS.EXE on MS-DOS. You can identify one using the file tool, which will give output such as the following:

aadobergb1998.ic_: MS Compress archive data, SZDD variant, c is last character of original name, original size: 560 bytes

The extension also indicates that the file is an SZDD archive: the last character is replaced by an underscore (note that KWAJ and InstallShield archives use the same extension format). file is able to determine what the last character was, as well as the uncompressed size of the file. In this case, the original file was called "aadobergb1998.icc". Also, SZDD archives are composed of individual files for each compressed file, and so are properly "compressed files" rather than "archive files" (which concatenate multiple files into one archive file).

The file that I needed to expand was an ICC profile for a scanner that was provided as a self-contained Windows installer, which I was able to expand using The Unarchiver. However, the SZDD archive inside couldn't be expanded by the latter.

I tried compiling ms-expand.c, a small program for expanding SZDD archives adapted by Daniel Risacher to run on Linux. Trying to compile on macOS 10.14 using the XCode developer tools gcc/clang compiler gave a 'conflicting types error' due to an implicit function declaration. Fixing this required simply moving the main function to the end of the file so that the functions called would have been previously declared.

Despite successfully compiling, the program would not expand the archive. An output file would be created with the name specified in the invocation ("ms-compress adobergb1998.ic_ adobergb1998.icc"), but was simply a copy of the input file.

Deciding on a different approach, I downloaded a copy of the MS-DOS emulator dosbox-x using Homebrew, as well as copy of the MS-DOS tool EXPAND.EXE.

The emulator was simply started from the command line, opening an MS-DOS shell. The built-in MOUNT command was used to attach the directory containing both EXPAND.EXE and the SZDD archive file to the emulator. With the directory mounted in the emulator, EXPAND.EXE was invoked to expand the archive:

MS-DOS prompt showing expansion of SZDD compressed file

Inspection of the expanded file using file showed that the expected ICC file was successfully expanded:

ADOBER~1.ICC: ColorSync color profile 2.1, type ADBE, RGB/XYZ-mntr device by ADBE, 560 bytes, 11-8-2000 19:51:59 "Adobe RGB (1998)"