DIET (compression)

DIET is an executable compression and file compression utility for DOS, developed by Teddy Matsumoto. It does executable compression of EXE files (to EXE) and COM files (to EXE or COM).

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  option.

Technical notes
Researchers should note that DIET's behavior depends on the cluster size of the relevant filesystem. Use the  option to turn off this feature, or else DIET will probably decide not to compress most of your files.

Identification
EXE files usually have ASCII "" at offset 28.

The newer versions of DIET (e.g., v1.45f) detect compressed files by searching for the byte sequence, and ASCII "", 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) 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 at offset 17.

Software

 * DIET
 * v1.02b
 * → Executable Tools Pack → packers/diet.*
 * Various versions at old-dos.ru
 * → Executable Tools Pack → packers/diet.*
 * Various versions at old-dos.ru
 * → Executable Tools Pack → packers/diet.*
 * Various versions at old-dos.ru
 * Various versions at old-dos.ru

For other utilities that may decompress DIET-compressed executables, see Executable compression.

Sample files

 * https://telparia.com/fileFormatSamples/archive/diet/