CP Shrink

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
m (Change telparia.com samples link to template)
(Undo revision 46576 by Dexvertbot (talk))
Line 23: Line 23:
 
   0              8            Archive Header segment
 
   0              8            Archive Header segment
 
   8              32×nmembers  Member File Headers segment
 
   8              32×nmembers  Member File Headers segment
   8 32×nmembers              File Data area
+
   8+32×nmembers              File Data area
 
   
 
   
 
  Archive Header segment
 
  Archive Header segment
Line 44: Line 44:
 
   Offset  Size  Description
 
   Offset  Size  Description
 
   ------  ----  -----------
 
   ------  ----  -----------
  0      4      CRC of *compressed* file data
+
  +0      4      CRC of *compressed* file data
  4      15    Filename, NUL terminated
+
  +4      15    Filename, NUL terminated
  19      1      Compression method:
+
  +19      1      Compression method:
 
                   0 = [[PKWARE DCL Implode]], Binary
 
                   0 = [[PKWARE DCL Implode]], Binary
 
                   1 = PKWARE DCL Implode, ASCII
 
                   1 = PKWARE DCL Implode, ASCII
 
                   2 = not compressed
 
                   2 = not compressed
  20      4      Original size
+
  +20      4      Original size
  24      4      Compressed size
+
  +24      4      Compressed size
  28      4      Timestamp ([[MS-DOS date/time|DOS date, time]])
+
  +28      4      Timestamp ([[MS-DOS date/time|DOS date, time]])
 
   
 
   
 
  File Data area
 
  File Data area
 
   
 
   
   The first file's compressed data starts at 8 32×nmembers.
+
   The first file's compressed data starts at 8+32×nmembers.
 
   
 
   
 
   Location of other files' data is implied by the sum of the compressed
 
   Location of other files' data is implied by the sum of the compressed
Line 71: Line 71:
  
 
== Sample files ==
 
== Sample files ==
* {{DexvertSamples|archive/cpShrink}}
+
* https://telparia.com/fileFormatSamples/archive/cpShrink/

Revision as of 15:01, 30 July 2025

File Format
Name CP Shrink
Ontology
Extension(s) .cpz
Released ≤1992

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

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.

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.

Software

Sample files

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox