.CPGZ

CPGZ File

Gzip-compressed CPIO Archive
Ask a question
QUICK ANSWER

A CPGZ file is a CPIO archive compressed with gzip - two layers stacked, gzip over cpio. On macOS, double-click it and Archive Utility extracts it. If a downloaded ZIP turned into a CPGZ, the ZIP is corrupt or incomplete - re-download it or open it with The Unarchiver instead of double-clicking again.

Developer: N/A (combination of POSIX cpio + GNU gzip; produced by macOS ditto/Archive Utility) Category: Compressed Files Open standard MIME: application/gzip
OPENS ON Windows macOS Linux
Related: .RAR · .ZIP · .Z01 · .7Z

On this page

19k+ extensions indexed
Last reviewed Jun 19, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the CPGZ file format?

The .cpgz extension marks a compressed CPIO (Copy In, Copy Out) file archive that uses the Gzip compression algorithm as its outer layer. CPGZ format doesn't impose any restriction on the type of data stored - it may hold application files, installers, documents, or photos. Creating a .cpgz involves two sequential stages:

  • Creation of an uncompressed CPIO archive - produces a single stream of files and directories, each preceded by a header section containing file metadata.
  • Compression using GZIP - a lossless method based on the DEFLATE algorithm, which reduces the archive's overall size.

Since Gzip-compressed files normally carry the .gz suffix, the combined .cpgz extension follows the same two-part naming convention as .tgz (a Gzip-compressed TAR archive). A .cpgz file begins with the standard gzip magic bytes 1F 8B 08 at offset 0; after decompression, the inner stream is a CPIO archive, most commonly in SVR4 newc format (magic 070701).

The format is most closely associated with macOS, where the ditto command-line tool and Archive Utility can both create and extract .cpgz files. On Linux and Unix, the equivalent pipeline is gunzip piped into cpio, or a single call using bsdtar.

A common real-world scenario is a .cpgz appearing unexpectedly as a failure artifact: when macOS Archive Utility cannot fully extract a downloaded .zip - because the file is truncated, corrupted, or structured in a way the utility mishandles - it may re-compress the partial result into a .cpgz. Repeatedly double-clicking the file then creates a loop: each attempt alternates between a .zip and a .cpgz without ever extracting the contents. The solution is to reacquire the original archive, or use a third-party tool such as The Unarchiver or Keka.

CPIO itself dates from the 1970s Unix era, when magnetic tapes were the primary archiving medium. Different CPIO variants store file headers in binary or ASCII text format, and maximum per-file sizes range from 2 GB in older binary variants to 4 GB in SVR4 newc. The .cpgz pairing is not a formal standard but a practical convention popularized by macOS tooling.

Security & safety

RISK: LOW

The format itself is safe - it's just compressed archive data that can't run on its own. Normal archive caution applies: a .cpgz from an untrusted source can contain executables or scripts revealed only after extraction, so scan contents before running anything, and extract untrusted archives into an empty folder (cpio can store absolute or '../' paths, a path-traversal risk). The most common 'problem' with .cpgz isn't malware but corruption: an unexpected .cpgz from a download usually means the .zip arrived broken - re-download rather than fighting it.

Format details

in a nutshell
FULL NAMEGzip-compressed CPIO Archiveaka CPGZ archive, gzipped cpio
DEVELOPERN/A (combination of POSIX cpio + GNU gzip; produced by macOS ditto/Archive Utility)since cpio: 1970s Unix; gzip: 1992. The .cpgz pairing is a macOS convention.
MIME TYPEapplication/gzip
TYPEA CPIO archive compressed with gzip (two layers: gzip over cpio)
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
000102
HEX
1F8B08
ASCII
···
A .cpgz begins with the gzip magic 1F 8B at offset 0 (byte 3 = 0x08 DEFLATE) - exactly like a .gz. After gunzip, the inner stream is a cpio archive: ASCII 'newc' cpio starts with '070701' (30 37 30 37 30 31), other variants with the octal magic 070707. The extension just signals the cpio-inside-gzip pairing.

Programs that open CPGZ files

Windows2 apps
7-Zip Open-source Open the .cpgz (extract the gzip layer to reveal the .cpio, then extract that). Free.
PeaZip Open-source Open the .cpgz and Extract; handles both the gzip and cpio layers.
macOS4 apps
The Unarchiver Free Set as default and double-click; far more tolerant of awkward archives than Archive Utility.
Archive Utility (built-in) Built-in Double-click the .cpgz to expand it. If it just loops back to a .zip, the source ZIP is corrupt - re-download or use The Unarchiver.
ditto (command line) Built-in ditto -x -k file.cpgz destfolder - Apple's own tool that creates and extracts .cpgz.
Keka Free Drag the .cpgz onto Keka to extract; handles the gzip+cpio layers in one pass.
Linux2 apps
gunzip + cpio (CLI) Open-source gunzip -c file.cpgz | cpio -idv (or cpio -idmv). Pre-installed on most systems.
bsdtar / libarchive Open-source bsdtar -xvf file.cpgz - libarchive auto-detects gzip+cpio and extracts in one command.

Technical details

deep spec
MIME typeapplication/gzip (primary); also application/x-cpio and application/octet-stream
Magic bytes1F 8B 08 at offset 0 (gzip outer layer); inner cpio stream opens with 070701 (SVR4 newc) after decompression
Outer compressionDEFLATE algorithm wrapped in gzip framing (RFC 1952)
Inner archive formatCPIO - most commonly SVR4 newc (magic 070701); also portable ASCII (magic 070707)
File encodingBinary outer stream; cpio newc entry headers use fixed-width ASCII-hex fields, making them endian-independent
Integrity checksgzip footer stores CRC-32 and 4-byte ISIZE (uncompressed size mod 2³²); cpio 'crc' variant adds per-file CRC-32 checksums
EncryptionNone - neither gzip nor cpio provides a built-in encryption layer; files must be encrypted separately if confidentiality is required
Max file size per entry~4 GB in SVR4 newc (32-bit filesize field); older binary cpio format limited to ~2 GB
Archive structureLinear sequential stream with no central directory; all entries must be read from the start of the stream
cpio entry header (newc)110-byte fixed-length ASCII header per entry, followed by the null-terminated filename and file data padded to 4-byte boundaries
Associated platformsmacOS (primary); Linux; Unix
Primary creation tool (macOS)ditto command-line utility; Archive Utility also produces .cpgz as a failure artifact when a .zip cannot be fully extracted
Maximum entry countNo fixed limit; cpio streams entries sequentially without a central-directory record cap
Streaming extractionYes - sequential design enables pipe-based extraction (e.g., gunzip -c file.cpgz | cpio -idmv) without loading a directory into memory
Releasedcpio: 1970s Unix; gzip: 1992. The .cpgz pairing is a macOS convention.
Latest versionN/A (relies on stable gzip RFC 1952 + POSIX cpio formats)
Open standardYes · royalty-free
Specificationwww.rfc-editor.org

CPGZ conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with CPGZ files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about CPGZ files.

Frequently asked questions

What is a CPGZ file?
A cpio archive compressed with gzip (gzip over cpio) - the cpio cousin of a .tar.gz. It's mostly a macOS thing created by the ditto tool and Archive Utility.
Why did my ZIP turn into a CPGZ on my Mac?
Archive Utility couldn't fully extract the .zip - usually because the download is corrupt, truncated, or partially downloaded. Re-download the file (try a different browser) or open it with The Unarchiver / Keka instead.
My .zip and .cpgz keep switching back and forth - how do I fix it?
That loop means the original ZIP is damaged. Stop double-clicking; re-download the .zip, or open it with The Unarchiver or Keka, which handle imperfect archives better than Archive Utility.
How do I open a CPGZ file?
On macOS double-click it, or run ditto -x -k file.cpgz dest. On Linux: gunzip -c file.cpgz | cpio -idv. On Windows use free 7-Zip or PeaZip.
How do I open a CPGZ on Windows?
Install 7-Zip or PeaZip (free). Open the .cpgz to peel off the gzip layer, revealing the inner .cpio, then extract that to get the files.
Is a CPGZ the same as a tar.gz?
Almost - same idea (an archive then gzipped), but the inner archive is cpio, not tar. Both compress to one .gz-style stream; tools handle cpgz much like tar.gz.

References

1RFC 1952 - GZIP file formatwww.rfc-editor.org
2GNU cpio - manualwww.gnu.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.RPMSGRestricted Permission Message
6.MDMarkdown Document
7.NOMEDIAAndroid No-Media Marker File
8.PRO6XProPresenter 6 Bundle File
9.EXEWindows Executable (Portable Executable)
10.PRDXSoftMaker Presentations Document

Related extensions

.RARRAR Archive (Roshal ARchive)
.ZIPZIP Archive
.Z01Split ZIP Archive - First Part
.7Z7-Zip Archive
.001Split / multi-volume archive - first part (.001)
.ZIRenamed / Truncated ZIP Archive

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z