It can also compress arbitrary data files. Such files can be transparently decompressed by DIET's TSR utility.
Both types of files can be decompressed using the
Researchers should note that DIET's behavior depends on the cluster size of the relevant filesystem. Use the
-B option to turn off this feature, or else DIET will probably decide not to compress most of your files.
EXE files usually have ASCII "
diet" at offset 28.
The newer versions of DIET (e.g., v1.45f) detect compressed files by searching for the byte sequence
0x9d 0x89, and ASCII "
dlz", in the first 126 bytes of the file. Both must appear, in that order. This works for most DIET-compressed formats, but not for all of the older ones.
v1.44-1.45f: For an EXE file, the sequences are at offsets 18 (the checksum field -- refer to MS-DOS EXE#Header structure) and 108. For a COM file, the offsets are 10 and 65. For a data file, the offsets are 4 and 6.
v1.20: For an EXE file, the offsets are 18 and 87. For a data file, the offsets are 0 and 2.
A possible signature for v1.20 (and v1.00) COM files is
fd f3 a5 fc 8b f7 bf 00 01 ad ad 8b e8 b2 10 e9 at offset 17.