Skip to main content

7-Zip Method Codes

· 3 mins
Extra 7-Zip
Ryan Gibson
Author
Ryan Gibson
Quantitative Analyst | Computer Scientist
Table of Contents

When you open a 7-Zip archive in a UI or with 7z l -slt, you’ll see a “Method” field (e.g., LZMA2:24) indicating which method was used to compress the files in the archive.

Below are some of the most common ones and what they mean. While they do not uniquely identify all settings that were used, they are useful for trying to determine how the data was originally compressed.

General Information
#

The most basic and universal method is simply having no compression at all.

MethodCommentRelevant Preset
CopyNo compressionStore

Otherwise, the method is typically composed of the name of the compression method and a sequence of parameters specific to it, {MethodId}:{ParamName}{Value}:....

Often, the only parameter listed is the dictionary size, which is encoded as a power-of-two number of bytes when possible.

  • For example, LZMA2:24 uses the LZMA2 compression method with a dictionary size of \(2^{24} \text{ bytes} = 2^4 \cdot 2^{20} \text{ bytes} = 16 \text{ MiB}\).
  • If the size is not a perfect power of two, the number of MiB is used instead with an m suffix, e.g., LZMA2:48m means 48 MiB.

Methods can also be prefixed by the compression filters used in a similar format, (e.g., Delta LZMA2:24 or Delta:4 LZMA2:24) or suffixed with other method-specific parameters (e.g., LZMA2:24:lc1:lp2).

The possible compression filters are Delta, BCJ, BCJ2, ARM64, ARMT, ARM, PPC, SPARC, IA64, Swap2 and Swap4.

LZMA and LZMA2
#

For the LZMA compression methods, the parameter is usually just the dictionary size. LZMA and LZMA2 share the same format.

MethodDictionary SizePreset
LZMA2:1664 KiBFastest
LZMA2:201 MiBFast
LZMA2:212 MiB
LZMA2:3m3 MiB
LZMA2:224 MiB
LZMA2:6m6 MiB
LZMA2:238 MiB
LZMA2:12m12 MiB
LZMA2:2416 MiBNormal
LZMA2:24m24 MiB
LZMA2:2532 MiBMaximum
LZMA2:48m48 MiB
LZMA2:2664 MiBUltra
LZMA2:96m96 MiB
LZMA2:27128 MiB
LZMA2:192m192 MiB
LZMA2:28256 MiB
LZMA2:384m384 MiB
LZMA2:29512 MiB
LZMA2:768m768 MiB
LZMA2:301024 MiB
LZMA2:1536m1536 MiB

PPMd
#

For PPMd, the parameters typically show both the word size and dictionary size. Examples are shown below.

MethodWord SizeDictionary SizePreset
PPMD:o2:mem2021 MiB
PPMD:o3:mem2132 MiB
PPMD:o4:mem3m43 MiB
PPMD:o4:mem2244 MiBFastest and Fast
PPMD:o4:mem6m46 MiB
PPMD:o5:mem2358 MiB
PPMD:o5:mem12m512 MiB
PPMD:o6:mem24616 MiBNormal
PPMD:o7:mem24m724 MiB
PPMD:o8:mem24m824 MiB
PPMD:o10:mem251032 MiB
PPMD:o12:mem251232 MiB
PPMD:o14:mem48m1448 MiB
PPMD:o16:mem261664 MiBMaximum
PPMD:o20:mem96m2096 MiB
PPMD:o24:mem2724128 MiB
PPMD:o28:mem2728128 MiB
PPMD:o32:mem192m32192 MiBUltra
PPMD:o32:mem2832256 MiB
PPMD:o32:mem384m32384 MiB
PPMD:o32:mem2932512 MiB
PPMD:o32:mem768m32768 MiB
PPMD:o32:mem30321024 MiB

BZip2, Deflate, and Deflate64
#

These compression methods often do not have any extra components unless filters or specific parameters were passed.

MethodComments
BZip2BZip2 compression
DeflateDeflate compression (often a .zip file)
Deflate64Deflate64 compression (often a .zip file)

See also and references
#

Please also refer to the documentation available at the main 7-Zip website and some basic details over on their Wikipedia page.

Related

Evaluating LLM Performance via LLM Judges
· 4 mins
Machine-Learning Large-Language-Models Evaluation Methodology Extra
Methodology details for how LLMs can rate the performance of other LLMs.
Historical PC Build Data
· 2 mins
Extra Historical-Data Pc-Building
Historical data sets I’ve scraped on PC build composition and performance benchmarks.
Tables of Hybrid Work's Impact on Effective Pay and Free Time
· 2 mins
Extra Time-Management Remote-Work Return-to-Office
A reference for pay and work-life balance shifts implied by changes in remote working schedules.