DIET (compression)

From Just Solve the File Format Problem
Jump to: navigation, search
File Format
Name DIET (compression)
Ontology
Released 1990 (beta), 1991

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

Contents

Technical notes

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.

Identification

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.

Software

Sample files

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox