Skip to content

Appendix B: Method IDs

This appendix provides a complete reference of compression, filter, and encryption method IDs used in 7z archives.

Method ID Format

Method IDs are variable-length byte sequences (1-15 bytes). The length is encoded in the coder flags byte.

Method ID bytes are stored and compared in the order shown in this document. For example, the LZMA method ID 03 01 01 is stored with 03 first, followed by 01, then 01. This is the natural byte order (not reversed).

Method Categories

CategoryID PrefixDescription
Simple0x00-0x20Basic methods
7z Native0x03XXXXLZMA, PPMd, BCJ filters
ZIP Compat0x04XXXXDeflate, BZip2
Extended0x04F7XXXXModern codecs (Zstd, etc.)
Crypto0x06XXXXEncryption methods

Compression Methods

Mandatory Methods

Implementations MUST support these methods:

Method IDNamePropertiesDescription
00CopyNoneNo compression
03 01 01LZMA5 bytesLZMA compression
21LZMA21 byteModern LZMA variant

Implementations SHOULD support these methods:

Method IDNamePropertiesDescription
04 01 08DeflateNoneZIP-compatible
04 02 02BZip2NoneBWT compression
03 04 01PPMd5 bytesPrediction-based

Optional Methods

Implementations MAY support these methods:

Method IDNamePropertiesDescription
04 01 09Deflate64NoneExtended Deflate
04 F7 11 01ZstandardVariableFacebook codec
04 F7 11 02BrotliVariableGoogle codec
04 F7 11 04LZ4VariableFast compression
04 F7 11 05LZ5/LZSVariableLZ5 variant
04 F7 11 06LizardVariableLZ5 variant

Filter Methods

Mandatory Filters

Method IDNamePropertiesDescription
03Delta1 byteDelta encoding
Method IDShort IDNameArchitecture
03 03 01 0304BCJx86/x64
03 03 02 0505BCJ_PPCPowerPC
03 03 04 0106BCJ_IA64Itanium
03 03 05 0107BCJ_ARMARM 32-bit
03 03 07 0108BCJ_ARMTARM Thumb
03 03 08 0509BCJ_SPARCSPARC

Modern Filters (Optional)

Method IDNameDescription
0AARM64ARM 64-bit filter
0BRISC-VRISC-V filter

Complex Filters

Method IDNameStreamsDescription
03 03 01 1BBCJ24 in / 1 outAdvanced x86 filter

Encryption Methods

Method IDNameDescription
06 F1 07 01AES-256-SHA2567z standard encryption

Crypto Method ID Structure

06        - Crypto category
F1        - 7z crypto
07        - Key size: 07 = 256-bit
01        - Hash: 01 = SHA-256

Key Size Variants

ByteKey Size
01128 bits
03192 bits
07256 bits

Note: Only AES-256-SHA256 (0x06F10701) is commonly used.

Legacy Methods

These methods exist but are rarely used:

Method IDNameNotes
02 03 02SWAP2Byte swap (2 bytes)
02 03 04SWAP4Byte swap (4 bytes)
04 01MISC_ZIPZIP method marker
04 05MISC_ZLZW compression
04 06MISC_LZHLZH compression
04 09 01NSIS_DEFLATENSIS Deflate
04 09 02NSIS_BZIP2NSIS BZip2

Method Properties

Copy (0x00)

No properties. Data passes through unchanged.

LZMA (0x030101)

5 bytes:

ByteDescription
0lc + lp * 9 + pb * 45
1-4Dictionary size (UINT32)

Constraints:

  • lc: 0-8 (literal context bits)
  • lp: 0-4 (literal position bits)
  • pb: 0-4 (position bits)
  • lc + lp ≤ 4

Default: 5D 00 00 10 00 (lc=3, lp=0, pb=2, dict=16 MiB)

LZMA2 (0x21)

1 byte encoding dictionary size. See [10-COMPRESSION-METHODS](/7z/10-compression-methods#lzma2) for the complete dictionary size formula and encoding table.

Quick reference (common values):

  • 0x14: 1 MiB
  • 0x18: 4 MiB
  • 0x1C: 16 MiB
  • 0x1E: 32 MiB
  • 0x20: 64 MiB
  • 0x28: 4 GiB - 1 (maximum)
  • 0x29+: Reserved; implementations SHOULD reject

PPMd (0x030401)

5 bytes:

ByteDescription
0Order (model order, 2-16)
1-4Memory size (UINT32)

Delta (0x03)

1 byte (optional, default 1):

ByteDescription
0Distance - 1 (0 = distance 1)

BCJ Filters

Optional 4-byte property:

BytesDescription
0-3Start offset (UINT32, default 0)

AES-256-SHA256 (0x06F10701)

2-18 bytes:

ByteDescription
0(salt_size) | (iv_size << 4)
1num_cycles_power (iterations = 2^n, MUST be <= 30)
2-nSalt bytes (0-16)
n+1-mIV bytes (0-16)

See [12-ENCRYPTION](/7z/12-encryption) for complete encryption details and security limits.

Method Support Matrix

Methodzesven7-Zipp7zippy7zr
CopyR/WR/WR/WR/W
LZMAR/WR/WR/WR/W
LZMA2R/WR/WR/WR/W
DeflateR/WR/WR/WR/W
BZip2R/WR/WR/WR/W
PPMdR/WR/WR/WR/W
BCJR/WR/WR/WR/W
BCJ2R/WR/WR/W-
DeltaR/WR/WR/WR/W
AESR/WR/WR/WR/W
ZstdR/WR/W*R/W*R/W
LZ4R/WR/W*--
BrotliR/WR/W*--

R = Read, W = Write, * = Requires 7-Zip-zstd fork

Unknown Methods

When encountering an unknown method:

  1. Report method ID in error
  2. Skip the entry (cannot decompress)
  3. Continue processing other entries
function handle_unknown_method(method_id):
    error(ERROR_UNSUPPORTED,
        "Unknown compression method: 0x{}".format(hex(method_id)))

See Also

Released under MIT OR Apache-2.0 License