CP Shrink
From Just Solve the File Format Problem
(Difference between revisions)
(→Software) |
Dexvertbot (Talk | contribs) m (Change telparia.com samples link to template) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
}} | }} | ||
'''CP Shrink''' (or CPSHRINK) is a compressed archive program for DOS, and its native '''.CPZ''' file format. It was developed by Central Point Software. It usually uses [[PKWARE DCL Implode]] compression. | '''CP Shrink''' (or CPSHRINK) is a compressed archive program for DOS, and its native '''.CPZ''' file format. It was developed by Central Point Software. It usually uses [[PKWARE DCL Implode]] compression. | ||
+ | |||
+ | == File structure == | ||
+ | |||
+ | CPSHRINK CPZ archive format overview | ||
+ | |||
+ | This information is based on reverse engineering. It may be incorrect | ||
+ | or incomplete. | ||
+ | Byte order is little-endian. | ||
+ | CRC algorithm is [[CRC-32#CRC-32/ISO-HDLC|CRC-32-IEEE]]. | ||
+ | Sizes and offsets are in bytes, unless otherwise noted. | ||
+ | |||
+ | File structure | ||
+ | |||
+ | Offset Size Description | ||
+ | ------ ---- ----------- | ||
+ | 0 8 Archive Header segment | ||
+ | 8 32×nmembers Member File Headers segment | ||
+ | 8 32×nmembers File Data area | ||
+ | |||
+ | Archive Header segment | ||
+ | |||
+ | Offset Size Label Description | ||
+ | ------ ---- ----- ----------- | ||
+ | 0 4 nmembers Number of member files | ||
+ | 4 4 CRC of the 32×nmembers bytes following this | ||
+ | field | ||
+ | |||
+ | Note: The nmembers field might actually be a 2-byte field, followed | ||
+ | by 2 bytes of unknown use. | ||
+ | |||
+ | Member File Headers segment | ||
+ | |||
+ | Sequence of Member File Headers, each 32 bytes, starts at offset 8. | ||
+ | |||
+ | Member File Header | ||
+ | |||
+ | Offset Size Description | ||
+ | ------ ---- ----------- | ||
+ | 0 4 CRC of *compressed* file data | ||
+ | 4 15 Filename, NUL terminated | ||
+ | 19 1 Compression method: | ||
+ | 0 = [[PKWARE DCL Implode]], Binary | ||
+ | 1 = PKWARE DCL Implode, ASCII | ||
+ | 2 = not compressed | ||
+ | 20 4 Original size | ||
+ | 24 4 Compressed size | ||
+ | 28 4 Timestamp ([[MS-DOS date/time|DOS date, time]]) | ||
+ | |||
+ | File Data area | ||
+ | |||
+ | The first file's compressed data starts at 8 32×nmembers. | ||
+ | |||
+ | Location of other files' data is implied by the sum of the compressed | ||
+ | sizes of the preceding files. | ||
== Identification == | == Identification == | ||
− | There's no | + | There's no quick and easy way to identify a CPZ file from its contents. Validating the CRC of the file headers segment could work, but that segment does not have a fixed size. |
== Software == | == Software == | ||
Line 14: | Line 68: | ||
* [https://archive.org/details/PCToolsProV9.0German PC Tools Pro v9.0 (German)] → disk1.img → CPSHRINK.EXE (German) | * [https://archive.org/details/PCToolsProV9.0German PC Tools Pro v9.0 (German)] → disk1.img → CPSHRINK.EXE (German) | ||
* [{{SACFTPURL|pack|cpshrink.zip}} CP Shrink], from the SAC collection (German) | * [{{SACFTPURL|pack|cpshrink.zip}} CP Shrink], from the SAC collection (German) | ||
+ | * {{Deark}} | ||
+ | |||
+ | == Sample files == | ||
+ | * {{DexvertSamples|archive/cpShrink}} |
Latest revision as of 02:55, 28 December 2023
CP Shrink (or CPSHRINK) is a compressed archive program for DOS, and its native .CPZ file format. It was developed by Central Point Software. It usually uses PKWARE DCL Implode compression.
Contents |
[edit] File structure
CPSHRINK CPZ archive format overview This information is based on reverse engineering. It may be incorrect or incomplete. Byte order is little-endian. CRC algorithm is CRC-32-IEEE. Sizes and offsets are in bytes, unless otherwise noted. File structure Offset Size Description ------ ---- ----------- 0 8 Archive Header segment 8 32×nmembers Member File Headers segment 8 32×nmembers File Data area Archive Header segment Offset Size Label Description ------ ---- ----- ----------- 0 4 nmembers Number of member files 4 4 CRC of the 32×nmembers bytes following this field Note: The nmembers field might actually be a 2-byte field, followed by 2 bytes of unknown use. Member File Headers segment Sequence of Member File Headers, each 32 bytes, starts at offset 8. Member File Header Offset Size Description ------ ---- ----------- 0 4 CRC of *compressed* file data 4 15 Filename, NUL terminated 19 1 Compression method: 0 = PKWARE DCL Implode, Binary 1 = PKWARE DCL Implode, ASCII 2 = not compressed 20 4 Original size 24 4 Compressed size 28 4 Timestamp (DOS date, time) File Data area The first file's compressed data starts at 8 32×nmembers. Location of other files' data is implied by the sum of the compressed sizes of the preceding files.
[edit] Identification
There's no quick and easy way to identify a CPZ file from its contents. Validating the CRC of the file headers segment could work, but that segment does not have a fixed size.
[edit] Software
- Central Point More PC Tools 2.0 for DOS and Windows (German) → disk1.img → CPSHRINK.EXE (English)
- PC Tools Pro v9.0 (German) → disk1.img → CPSHRINK.EXE (German)
- CP Shrink, from the SAC collection (German)
- Deark