What type(s) of compressed files was the MS-DOS EXPAND
command able to decompress?
And what command was its counterpart?
1 Answer
EXPAND.EXE is a tool specifically created for installation of Microsoft products. Its file format is a proprietary Microsoft definition, not following any existing standard. It is only good to expand their own 'SZDD' (and later 'KWAJ') formats, not any other.
Its counterpart is COMPRESS.EXE which, AFAIK was not delivered with MS-DOS.
It uses of course well known algorithms. The original format, up to version 1.3, was identified by the 4-byte magic number of 'SZDD' at the start of the file. The compression method used is a rather straight LZSS. Later, with 1.4, the file format changed and the magic word became 'KWAJ'. This version supported five storage methods:
- No Compression
- No Compression, but all data inverted as camouflage against typing
- LZSS as with prior versions
- LZH
- (MS-)ZIP (as used with later Windows .CAB files)
So, while more common compression got added, the file format stayed still MS-specific. Nonetheless, some programs, like 7-Zip, recognize the magic numbers and decode accordingly.
A look at this fine page will show more technical detail.
-
Thank you for the very detailed answer. The specific magic numbers would have been my next question :) Jan 28 at 17:22
-
2What does "all data inverted as camouflage against typing" mean? I don't understand this sentence.– zomegaJan 28 at 17:30
-
6@zomega Well, Inverted means all zeros are stored as ones and all ones as zeros. Doing so will prevent a type command or other basic file viewer from showing any readable text.– RaffzahnJan 28 at 17:39