Format:PBZX
| Vendor | Apple |
|---|---|
| Magic | 70 62 7A 78 ("pbzx") |
| Extensions | .pbzx, payload files in OTA/pkg |
| Endianness | big-endian |
| On this wiki | Facts · Code · Notes · Topics |
pbzx is the chunked xz stream that wraps the payload of Apple OTA updates and some installer packages: the ASCII magic "pbzx", a big-endian block size, then chunks each preceded by two big-endian 64-bit sizes.
Layout
Read from ipsw pkg/ota/pbzx/read.go (blacktop/ipsw, MIT):
char magic[4]; // "pbzx"
uint64_t blockSize; // big-endian
// repeated until end of file:
uint64_t inflateSize; // big-endian: size of this chunk after decompression
uint64_t deflateSize; // big-endian: size of the chunk data that follows
uint8_t data[deflateSize];
Rules in that reader: if deflateSize < inflateSize the chunk data is an xz stream that must decompress to exactly inflateSize bytes; if the two are equal the chunk is stored as is; deflateSize > inflateSize is rejected as a bad chunk header. The chunks are concatenated in order to form the output. The decompressor used is an xz reader on each chunk separately (multistream off).
What it contains
Unverified: the concatenated output is a cpio archive in the OTA payload files and in some flat .pkg Payload members (see Format:XAR archive); check the first bytes of the output (070707 or 070701 for cpio) after decompressing.
Identification
First four bytes 70 62 7A 78. ipsw has a pbzx command that checks this magic before decompressing.
Code & repositories
- {{Repo|url=https://github.com/blacktop/ipsw%7Ccommit=a9eae76e8b1e901e4a03dd530defac8a1b33f91a%7Clicense=MIT%7Cdescription=ipsw (MIT): pkg/img4 (IMG4/IM4P/IM4M/IM4R parser), pkg/ota/pbzx (pbzx reader), pkg/dyld (shared cache reader), pkg/kernelcache|tested_on=source read, not run: source read, not run: Go sources read only|checked=checked 2026-10-19; last activity 2026-10-16; Note: the latest release ships binaries; the wiki links only the source, never the binaries}}