DIET (compression)

From Just Solve the File Format Problem
Revision as of 13:48, 13 September 2022 by Jsummers (Talk | contribs)

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

Compressed data files apparently start with bytes b4 4c cd 21 9d 89 64 6c 7a.

EXE files most likely have ASCII "diet" at offset 28.

To detect its compressed files, DIET (at least v1.45f) looks for the byte sequence 0x9d 0x89, and ASCII "dlz", in the first 126 bytes of the file. Both must appear, in that order.

In practice, in an EXE file, the sequences are at offsets 18 (the checksum field -- refer to MS-DOS EXE#Header structure) and 108. In a COM file, they are at offsets 10 and 65. In a data file, they are at offsets 4 and 6.

Software

Sample files

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox