The format of a Quantum archive is very simple. The first part consists of a header which identifies the file as a Quantum archive and includes a list of the files which reside in the archive. It looks like this: (NOTE: The file format is subject to change.) Bytes Description ----- ----------- 2 Signature, must be 0x44 followed by 0x53. 1 Major version number. 1 Minor version number. 2 The number of files which reside in this archive. 1 The table size required for decompression. 1 Compression flags. This is immediately followed by the list of files: Bytes Description ----- ----------- Var. The length of the file name. See (*) below. Var. The file name. Variable length string. Not zero-terminated. Var. The length of the comment field. See (*) below. Var. The comment field. Variable length string. Not zero-terminated. 4 The fully expanded file size in bytes. 2 The file time (DOS format). 2 The file date (DOS format). (*) Strings are prefixed with their length. This takes one or two bytes. If the length is less than 128 then it is stored directly in one byte. If it is greater than 127 then the high bit of the first byte is set to 1 and the remaining fifteen bits contain the actual length in big-endian format. Immediately following the list of files is the compressed data.