Quantum compression
The Quantum compression format is a little-known data compression method created by David Stafford of Cinematronics, LLC. Rights to it were purchased by Microsoft, and Quantum is one of the possible compression methods in a CAB archive[1]. Quantum uses an extended LZ compression algorithm. Quantum archive files have by convention the filename extension .Q.
Quantum archiver
PAQ.EXE is the Quantum compressor for MS-DOS and UNPAQ.EXE is the decompressor. These are 32-bit applications using a DOS extender.
There is no Quantum compressor for Windows. QWIN.EXE is the Quantum decompressor for 16-bit Windows. It is much faster than the MS-DOS decompressor and has more features such as selective decompression.
All the Quantum compressors and decompressors require at least a 386 CPU in order to run.
The last known version is 0.97.
.Q archive header
Bytes | Description |
---|---|
2 | signature, must be 0x44 followed by 0x53 |
1 | major version number |
1 | minor version number |
2 | number of files which reside in this archive |
1 | table size required for decompression |
1 | compression flags |
This is immediately followed by the list of files:
Bytes | Description |
---|---|
var. | length of file name, see (*) below |
var. | file name, variable length string, not zero-terminated |
var. | length of comment field, see (*) below |
var. | comment field, variable length string, not zero-terminated |
4 | fully expanded file size in bytes |
2 | file time (DOS format) |
2 | file date (DOS format) |
Immediately following the list of files is the compressed data.
(*) 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.
References
- ^ http://www.cabextract.org.uk/ History of CAB files format
- Salomon, David (2007). Data compression: the complete reference. Springer Verlag. p. 187. ISBN 1-84628-602-6.