CP Shrink

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Software)
(One intermediate revision by one user 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 obvious way to identify a CPZ file from its contents. There is probably some sort of checksum field of that could be validated, but more research is needed.
+
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 ==

Revision as of 17:19, 6 November 2021

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.

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

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox