MDCD

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Software)
(more precise identification, hints for using compilers from this century)
Line 16: Line 16:
  
 
== Identification ==
 
== Identification ==
Files begin with the ASCII signature "{{magic|MDmd}}".
+
* Files begin with the ASCII signature "{{magic|MDmd}}".
 +
* Offset 5 should always be {{magic|0x01}} (the header type).
 +
* Offset 6 and 7 have the bytes {{magic|0x7a 0x00}}, which is a word telling you that the whole header sizes 122 bytes.
 +
* Offset 24 has the byte {{magic|0x00}} (uncompressed) or {{magic|0x01}} (compressed) for the stored content. If uncompressed, two following pairs of 4 bytes must be identical (same file size for original and compressed). If compressed, the former should always be bigger than the latter, because MDCD will never store compressed files which turn out bigger than their original.
  
 
== Specifications ==
 
== Specifications ==
* For information about the header format, see the source code, MDCD.PAS, look for "FileHeader = Record".
+
* For information about the header format, see the source code, MDCD.PAS, look for "FileHeader = Record". As per Pascal for DOS the record is byte aligned, sizing 122 bytes in total (in FreePascal you'd need to define it as "Packed Record"). Type "DirStr" is a "String[67]" from the DOS unit. All "String[]" types store their length in a preceding byte, so "String[12]" means 13 bytes in total.
  
 
== Software ==
 
== Software ==

Revision as of 12:13, 18 October 2023

File Format
Name MDCD
Ontology
Extension(s) .md, .cd, others
Released 1988

MDCD is a compressed archiving utility, and its associated native file format. It was developed by Mike Davenport.

It was apparently used in some capacity by the Links 386 Pro video game.

Contents

Format details

The compression scheme is LZW with an 8K table, possibly identical to that used by Zoo. The CRC algorithm is CRC-16/XMODEM.

Identifiers

The default filename extension is .md, though some of the example commands inexplicably use .cd instead.

Identification

  • Files begin with the ASCII signature "MDmd".
  • Offset 5 should always be 0x01 (the header type).
  • Offset 6 and 7 have the bytes 0x7a 0x00, which is a word telling you that the whole header sizes 122 bytes.
  • Offset 24 has the byte 0x00 (uncompressed) or 0x01 (compressed) for the stored content. If uncompressed, two following pairs of 4 bytes must be identical (same file size for original and compressed). If compressed, the former should always be bigger than the latter, because MDCD will never store compressed files which turn out bigger than their original.

Specifications

  • For information about the header format, see the source code, MDCD.PAS, look for "FileHeader = Record". As per Pascal for DOS the record is byte aligned, sizing 122 bytes in total (in FreePascal you'd need to define it as "Packed Record"). Type "DirStr" is a "String[67]" from the DOS unit. All "String[]" types store their length in a preceding byte, so "String[12]" means 13 bytes in total.

Software

Sample files

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox