Skip to main content
7-Zip supports multiple compression methods, each optimized for different types of data and use cases. The compression method is identified by a unique binary ID in the archive format.

Supported Methods

7-Zip supports the following primary compression methods:

LZMA

Original LZMA algorithm with excellent compression ratio

LZMA2

Improved LZMA with multithreading and better handling of incompressible data

PPMd

Prediction by Partial Matching for highly compressible text

BZip2

Block-sorting compression with good ratio and speed

Deflate

Standard ZIP compression method

Method IDs

Each compression method in 7z archives is associated with a unique binary ID:
MethodID (Hex)Full ID
Copy0000
LZMA22121
LZMA03010103 01 01
PPMd03040103 04 01
BZip204020204 02 02
Deflate04010804 01 08
Deflate6404010904 01 09
The method ID is stored in the archive’s coder information and determines which decompression algorithm to use when extracting files.

Filter Methods

In addition to compression methods, 7-Zip supports filter methods that preprocess data before compression:
FilterID (Hex)Description
Delta03Delta filter for better compression of multimedia
BCJ (x86)04x86 executable filter
BCJ2 (x86)0301031BAdvanced x86 filter with 4 streams
ARM07ARM little-endian filter
ARM640AARM64 filter
ARMT08ARM Thumb filter
IA6406Intel Itanium filter
PPC05PowerPC big-endian filter
SPARC09SPARC filter
RISCV0BRISC-V filter

Choosing a Compression Method

Best for: Most use cases, especially with modern multi-core CPUs
  • Default method in 7z format
  • Supports multithreading
  • Better handling of incompressible data than LZMA
  • Excellent compression ratio
  • Dictionary size up to 1.5 GB (64-bit)
Best for: Maximum compatibility, single-threaded compression
  • Original LZMA algorithm
  • Used in .lzma files and older 7z archives
  • Slightly better compression than LZMA2 in some cases
  • Single-threaded only
  • Dictionary size up to 1.5 GB (64-bit)
Best for: Highly compressible text files, databases, source code
  • Excellent for text and structured data
  • High memory usage
  • Slower than LZMA/LZMA2
  • Best compression for text files
  • Memory size: 1 MB to 2 GB
Best for: Compatibility with other tools, balanced performance
  • Standard BZip2 algorithm
  • Good compression ratio
  • Moderate speed
  • Lower memory usage than LZMA
  • Block size: 100 KB to 900 KB
Best for: ZIP compatibility, fast decompression
  • Standard ZIP compression
  • Fastest decompression
  • Lower compression ratio than LZMA
  • Widely compatible
  • Used in ZIP, gzip, PNG formats

Performance Comparison

Performance varies significantly based on data type, compression level, and hardware. The following table shows typical characteristics:
MethodCompression RatioCompression SpeedDecompression SpeedMemory Usage
LZMA2Excellent (9/10)Slow (3/10)Medium (6/10)High
LZMAExcellent (9/10)Slow (3/10)Medium (6/10)High
PPMdExcellent (10/10)Very Slow (2/10)Slow (4/10)Very High
BZip2Good (7/10)Medium (5/10)Medium (6/10)Medium
DeflateFair (5/10)Fast (7/10)Very Fast (9/10)Low
For general-purpose compression, use LZMA2 with default settings. For text files, try PPMd with a high memory setting. For maximum compatibility, use Deflate.

Custom Method IDs

If you need to add a custom compression method, you can:
  1. Request ID allocation from 7-Zip developers
  2. Generate a random 8-byte ID with the format: 3F ZZ ZZ ZZ ZZ ZZ MM MM
    • 3F: Prefix for random IDs (1 byte)
    • ZZ ZZ ZZ ZZ ZZ: Developer ID (5 random bytes)
    • MM MM: Method ID (2 bytes)
Only use a new method ID if the old codec cannot decode data encoded with the new version. Maintain backward compatibility whenever possible.

Next Steps

LZMA Compression

Learn about the LZMA compression algorithm

LZMA2 Compression

Explore the improved LZMA2 method

PPMd Compression

Discover PPMd for text compression

Command Line Usage

Use compression methods in 7-Zip commands

Build docs developers (and LLMs) love