DIET (compression)

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Added sample files)
Line 3: Line 3:
 
|subcat=Compression
 
|subcat=Compression
 
|subcat2=Executable compression
 
|subcat2=Executable compression
|released=1991
+
|released=1990 (beta), 1991
 
}}
 
}}
'''DIET''' is an executable compression and file compression utility for DOS, developed by Teddy Matsumoto. It does executable compression of [[MS-DOS EXE|EXE]] and [[DOS executable (.com)|COM]] files.
+
'''DIET''' is an executable compression and file compression utility for DOS, developed by Teddy Matsumoto. It does executable compression of [[MS-DOS EXE|EXE]] files (to EXE) and [[DOS executable (.com)|COM]] files (to EXE or COM).
  
 
It can also compress arbitrary data files. Such files can be transparently decompressed by DIET's TSR utility.
 
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 <code>-ra</code> option.
+
Both types of files can be decompressed using the <code>-RA</code> option.
 +
 
 +
== Technical notes ==
 +
Researchers should note that DIET's behavior depends on the cluster size of the relevant filesystem. Use the <code>-B</code> option to turn off this feature, or else DIET will probably decide not to compress most of your files.
  
 
== Identification ==
 
== Identification ==
Line 15: Line 18:
  
 
EXE files most likely have ASCII "{{magic|diet}}" at offset 28.
 
EXE files most likely have ASCII "{{magic|diet}}" at offset 28.
 +
 +
To detect its compressed files, DIET (at least v1.45f) looks for the byte sequence {{magic|0x9d 0x89}}, and ASCII "{{magic|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 ==
 
== Software ==
Line 21: Line 28:
 
** {{CdTextfiles|ftp.wwiv.com/pub/COMPRESS/DIET144.ZIP|v1.44}}
 
** {{CdTextfiles|ftp.wwiv.com/pub/COMPRESS/DIET144.ZIP|v1.44}}
 
** {{CdTextfiles|pdos9606/ARCHIVER/EXECOMP/DIET145F.ZIP|v1.45f}}
 
** {{CdTextfiles|pdos9606/ARCHIVER/EXECOMP/DIET145F.ZIP|v1.45f}}
 +
** {{OldskoolDOSEXE}} → Executable Tools Pack → packers/diet.*
 +
** [http://old-dos.ru/index.php?page=files&mode=files&do=show&id=141 Various versions at old-dos.ru]
  
 
== Sample files ==
 
== Sample files ==
 
* https://telparia.com/fileFormatSamples/archive/diet/
 
* https://telparia.com/fileFormatSamples/archive/diet/

Revision as of 13:48, 13 September 2022

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