PKWARE DCL Implode
(Added Identification section, copied from TTCOMP) |
(→Identification) |
||
(4 intermediate revisions by one user not shown) | |||
Line 5: | Line 5: | ||
'''PKWARE DCL Implode''' is a compressed data format associated with ''PKWARE Data Compression Library'' (DCL), a commercial data compression software product. It is not the only format supported by DCL, but it is possibly the most notable one. | '''PKWARE DCL Implode''' is a compressed data format associated with ''PKWARE Data Compression Library'' (DCL), a commercial data compression software product. It is not the only format supported by DCL, but it is possibly the most notable one. | ||
+ | The terms "blast" and "explode" are sometimes used in association with this format. When used as a file format, it may be identified as [[TTCOMP]]. | ||
+ | |||
+ | == Disambiguation == | ||
DCL Implode is not the same format as [[ZIP]]'s old "implode" compression method (#6). It is unfortunate that there are two formats named "implode" associated with the same company. It ''can'' be used in ZIP, as compression method #10, but support for this is limited. | DCL Implode is not the same format as [[ZIP]]'s old "implode" compression method (#6). It is unfortunate that there are two formats named "implode" associated with the same company. It ''can'' be used in ZIP, as compression method #10, but support for this is limited. | ||
− | + | == Format details == | |
+ | DCL Implode is based on [[LZ77 with Huffman coding]]. It uses only predefined Huffman codebooks, so it is simpler than most compression methods in this family. | ||
== Identification == | == Identification == | ||
Line 20: | Line 24: | ||
Most common is {{magic|0x00 0x06}}, indicating binary compression and a 4K dictionary. | Most common is {{magic|0x00 0x06}}, indicating binary compression and a 4K dictionary. | ||
+ | |||
+ | Since the header bytes aren't very discriminating, it may be worth noting that the ''last'' 3 bytes of the datastream will match one of these 8 bit-patterns (assuming padding bits are 0, and there are no padding bytes): | ||
+ | |||
+ | ... xxxxxxxx 00000001 11111111 | ||
+ | ... 1xxxxxxx 10000000 01111111 | ||
+ | ... 01xxxxxx 11000000 00111111 | ||
+ | ... 001xxxxx 11100000 00011111 | ||
+ | ... 0001xxxx 11110000 00001111 | ||
+ | ... 00001xxx 11111000 00000111 | ||
+ | ... 000001xx 11111100 00000011 | ||
+ | ... 0000001x 11111110 00000001 | ||
+ | |||
+ | Caution: In some uses of this compression, e.g. by [[TSComp|The Stirling Compressor]] or [[PC-Shrink]], zero-length input compresses to zero-length output. In this special case, neither the header nor the last few bytes are present. | ||
== Related formats == | == Related formats == | ||
+ | * [[TTCOMP]] | ||
* [[TERSE]] | * [[TERSE]] | ||
+ | |||
+ | Formats that may use DCL Implode compression include: | ||
+ | * [[CAZIP]] | ||
+ | * [[CMZ (archive format)]] | ||
+ | * [[CP Shrink]] | ||
* [[InstallShield Z]] | * [[InstallShield Z]] | ||
+ | * [[NaShrinK]] | ||
+ | * [[PACKER (ImagiSOFT)]] | ||
+ | * [[TSComp]] | ||
+ | * [[ZAR (Zip-Archiv)]] | ||
* [[ZIP]] (compression method #10) | * [[ZIP]] (compression method #10) | ||
− | |||
− | |||
== Specifications == | == Specifications == | ||
Line 32: | Line 57: | ||
== Software == | == Software == | ||
− | * [[zlib]] | + | * [[zlib]] - Does not support DCL Implode directly, but its source code includes a decoder: contrib/blast. |
* [https://github.com/krisives/lawine/blob/master/lawine/misc/implode.c Lawine] (a Starcraft/Brood War Library) | * [https://github.com/krisives/lawine/blob/master/lawine/misc/implode.c Lawine] (a Starcraft/Brood War Library) | ||
* [https://github.com/ladislav-zezula/StormLib/tree/master/src/pklib StormLib/pklib] | * [https://github.com/ladislav-zezula/StormLib/tree/master/src/pklib StormLib/pklib] | ||
* https://github.com/JoshVarga/blast - An encoder/decoder written in Go | * https://github.com/JoshVarga/blast - An encoder/decoder written in Go | ||
+ | * [http://old-dos.ru/index.php?page=files&mode=files&do=show&id=1703 PKWare Library], at old-dos.ru | ||
+ | * [{{SACFTPURL|pack|pkzc400s.exe}} PKZIP Command Line v4.00 (Windows)] - Supports DCLImplode compression | ||
* [https://support.pkware.com/display/PKZIP/DCL PKWARE DCL] | * [https://support.pkware.com/display/PKZIP/DCL PKWARE DCL] | ||
+ | |||
+ | See also [[TTCOMP#Software]]. | ||
== Links == | == Links == |
Latest revision as of 14:10, 13 February 2023
PKWARE DCL Implode is a compressed data format associated with PKWARE Data Compression Library (DCL), a commercial data compression software product. It is not the only format supported by DCL, but it is possibly the most notable one.
The terms "blast" and "explode" are sometimes used in association with this format. When used as a file format, it may be identified as TTCOMP.
Contents |
[edit] Disambiguation
DCL Implode is not the same format as ZIP's old "implode" compression method (#6). It is unfortunate that there are two formats named "implode" associated with the same company. It can be used in ZIP, as compression method #10, but support for this is limited.
[edit] Format details
DCL Implode is based on LZ77 with Huffman coding. It uses only predefined Huffman codebooks, so it is simpler than most compression methods in this family.
[edit] Identification
A DCL Implode datastream starts with a two-byte header. The first byte indicates the type of compression:
-
0x00
: binary compression -
0x01
: ASCII compression (a method optimized for compressing text)
The second byte specifies the size of the dictionary:
-
0x04
: 1024 bytes -
0x05
: 2048 bytes -
0x06
: 4096 bytes
Most common is 0x00 0x06
, indicating binary compression and a 4K dictionary.
Since the header bytes aren't very discriminating, it may be worth noting that the last 3 bytes of the datastream will match one of these 8 bit-patterns (assuming padding bits are 0, and there are no padding bytes):
... xxxxxxxx 00000001 11111111 ... 1xxxxxxx 10000000 01111111 ... 01xxxxxx 11000000 00111111 ... 001xxxxx 11100000 00011111 ... 0001xxxx 11110000 00001111 ... 00001xxx 11111000 00000111 ... 000001xx 11111100 00000011 ... 0000001x 11111110 00000001
Caution: In some uses of this compression, e.g. by The Stirling Compressor or PC-Shrink, zero-length input compresses to zero-length output. In this special case, neither the header nor the last few bytes are present.
[edit] Related formats
Formats that may use DCL Implode compression include:
- CAZIP
- CMZ (archive format)
- CP Shrink
- InstallShield Z
- NaShrinK
- PACKER (ImagiSOFT)
- TSComp
- ZAR (Zip-Archiv)
- ZIP (compression method #10)
[edit] Specifications
- Reverse-engineered information by Ben Rudiak-Gould (Usenet post - comp.compression, 2001)
[edit] Software
- zlib - Does not support DCL Implode directly, but its source code includes a decoder: contrib/blast.
- Lawine (a Starcraft/Brood War Library)
- StormLib/pklib
- https://github.com/JoshVarga/blast - An encoder/decoder written in Go
- PKWare Library, at old-dos.ru
- PKZIP Command Line v4.00 (Windows) - Supports DCLImplode compression
- PKWARE DCL
See also TTCOMP#Software.