Each coder in a folder names its method
with an ID of 1 to 15 bytes. The register is Methods.txt in the 7-Zip
source. Most archives use only LZMA2 or LZMA, sometimes with a branch filter and
7zAES; the rest of the register is there because 7-Zip’s codecs are shared between
its archive handlers, and a 7z archive may name any of them.
Methods 7z archives use
| ID | Method | Properties |
|---|---|---|
00 | Copy (stored, no compression) | None |
03 | Delta filter | 1 byte: distance − 1 (1 to 256 bytes) |
04 | BCJ x86 filter (new ID form) | None |
05 | PPC branch filter, big-endian | None |
06 | IA64 branch filter | None |
07 | ARM branch filter, little-endian | None |
08 | ARM Thumb branch filter, little-endian | None |
09 | SPARC branch filter | None |
0A | ARM64 branch filter | Optional; 7-Zip accepts a 4-byte start offset |
0B | RISC-V branch filter | Optional, as ARM64 |
21 | LZMA2 | 1 byte: dictionary size |
03 01 01 | LZMA | 5 bytes: lc, lp, pb and dictionary size |
03 03 01 03 | BCJ x86 filter | None |
03 03 01 1B | BCJ2 x86 filter, four packed streams | None |
03 03 02 05 | PPC branch filter, big-endian | None |
03 03 03 01 | Alpha branch filter | None |
03 03 04 01 | IA64 branch filter | None |
03 03 05 01 | ARM branch filter, little-endian | None |
03 03 06 05 | M68 branch filter, big-endian | None |
03 03 07 01 | ARM Thumb branch filter, little-endian | None |
03 03 08 05 | SPARC branch filter | None |
03 04 01 | PPMd (variant H) | 5 bytes: order and memory size |
03 7F 01 | Experimental method | – |
04 02 02 | BZip2 | None |
04 01 08 | Deflate | None |
04 01 09 | Deflate64 | None |
06 F1 07 01 | 7zAES: AES-256 with a SHA-256 key | Cycles, salt and IV |
The one-byte filter IDs (04 to 0B) are the newer form;
7-Zip still writes the four-byte 03 03 … IDs for the older filters, and
readers accept both.
The rest of the register
| ID | Method |
|---|---|
02 03 02 | Swap2: swaps bytes in 2-byte units |
02 03 04 | Swap4: swaps bytes in 4-byte units |
04 00 | Reserved |
04 01 00 | ZIP Copy (not used; use 00) |
04 01 01 | ZIP Shrink |
04 01 06 | ZIP Implode |
04 01 0A | ZIP Imploding (method 10) |
04 01 0C | ZIP BZip2 (not used; use 04 02 02) |
04 01 0E | ZIP LZMA (LZMA as stored in ZIP) |
04 01 5D | ZIP Zstandard |
04 01 5F | ZIP xz |
04 01 60 | ZIP JPEG |
04 01 61 | ZIP WavPack |
04 01 62 | ZIP PPMd (variant I as stored in ZIP) |
04 01 63 | ZIP WinZip AES |
04 03 01 | RAR 1.x |
04 03 02 | RAR 2.x |
04 03 03 | RAR 3.x and 4.x |
04 03 05 | RAR 5 |
04 04 01 | ARJ methods 1, 2 and 3 |
04 04 02 | ARJ method 4 |
04 05 | Z (Unix compress) |
04 06 | LZH |
04 07 | Reserved for 7z |
04 08 | CAB |
04 09 01 | NSIS Deflate |
04 09 02 | NSIS BZip2 |
04 F7 0x xx | Reserved for external codecs |
04 F7 10 01 | LZHAM |
04 F7 11 01 | Zstandard (Tino Reichardt’s 7-Zip build) |
04 F7 11 02 | Brotli |
04 F7 11 04 | LZ4 |
04 F7 11 05 | LZ5 |
04 F7 11 06 | Lizard |
04 F7 12 01 | WavPack2 |
04 F7 12 FE | eSplitter |
04 F7 12 FF | RawSplitter |
04 F7 13 01 | Transpose |
06 F0 01 00 to 04 | AES-128 in ECB, CBC, CFB, OFB and CTR modes |
06 F0 01 40 to 44 | AES-192 in the same five modes |
06 F0 01 80 to 84 | AES-256 in the same five modes |
06 F0 01 C0 to C4 | AES with the key size given elsewhere, same five modes |
06 F1 01 01 | ZipCrypto (traditional ZIP encryption) |
06 F1 03 02 | RAR 2.x encryption (named only “RAR” in the register) |
06 F1 03 03 | RAR 2.9 AES: AES-128 with a modified SHA-1 key |
06 F1 07 02 to FF | Reserved for 7z |
The register also lists a few more private ranges kept for other developers; IDs not shown here have no public description, and a reader that does not know an ID cannot unpack that folder.
LZMA properties
| Offset | Size | Meaning |
|---|---|---|
0 | 1 | (pb × 5 + lp) × 9 + lc: lc literal context bits 0 to 8, lp literal position bits 0 to 4, pb position bits 0 to 4. The usual value 5D means lc 3, lp 0, pb 2. |
1 | 4 | Dictionary size in bytes, little-endian. |
These are the same five bytes that start a .lzma file. In 7z the uncompressed size is not stored with them; it comes from the folder’s unpack size.
LZMA2 properties
One byte, 0 to 40. The dictionary size is (2 | (b & 1)) << (b / 2 + 11),
so 0 is 4 KiB, 1 is 6 KiB, 2 is 8 KiB and so on, doubling every two steps; 40 means
4 GiB − 1. 18 (24) is 16 MiB. The LZMA2 chunk format is the same as in
.xz files.
PPMd properties
| Offset | Size | Meaning |
|---|---|---|
0 | 1 | Model order, 2 to 32. |
1 | 4 | Memory size in bytes, little-endian. |
7zAES properties
The key is made by hashing the password (UTF-16LE) and the salt with SHA-256 2cycles times, adding a 64-bit counter each round. Data is AES-256 in CBC mode. The property layout is from 7-Zip’s source, as the format description does not give it.
| Byte | Bits | Meaning |
|---|---|---|
0 | 0 to 5 | NumCyclesPower: log2 of the number of SHA-256 rounds, normally 19. |
0 | 6 | An IV follows (adds 1 to the IV size). |
0 | 7 | A salt follows (adds 1 to the salt size). |
1 | 4 to 7 | Added to the salt size. Present only when bit 6 or 7 of byte 0 is set. |
1 | 0 to 3 | Added to the IV size. |
| 2 … | The salt bytes, then the IV bytes (up to 16; a shorter IV is padded with zeros). |
When the end header is encrypted too, the file names cannot be listed without the password.