xref: /aosp_15_r20/external/lzma/DOC/Methods.txt (revision f6dc9357d832569d4d1f5d24eacdb3935a1ae8e6)
17-Zip method IDs for 7z and xz archives
2---------------------------------------
3
4Version: 24.02
5Date: 2024-03-22
6
7Each compression or crypto method in 7z is associated with unique binary value (ID).
8The length of ID in bytes is arbitrary but it can not exceed 63 bits (8 bytes).
9
10xz and 7z formats use same ID map.
11
12If you want to add some new ID, you have two ways:
13  1) Write request for allocating IDs to 7-Zip developers.
14  2) Generate 8-bytes ID:
15
16    3F ZZ ZZ ZZ ZZ ZZ MM MM
17
18    3F              - Prefix for random IDs (1 byte)
19    ZZ ZZ ZZ ZZ ZZ  - Developer ID (5 bytes). Use real random bytes.
20
21    MM MM           - Method ID (2 bytes)
22
23    You can notify 7-Zip developers about your Developer ID / Method ID.
24
25    Note: Use new ID, if old codec can not decode data encoded with new version.
26
27
28List of defined IDs
29-------------------
30
3100 - Copy
32
3303 - Delta
3404 - BCJ (x86)
3505 - PPC (big-endian)
3606 - IA64
3707 - ARM (little-endian)
3808 - ARMT (little-endian)
3909 - SPARC
400A - ARM64
410B - RISCV
42
4321 - LZMA2
44
4502.. - Common
46   03 [Swap]
47      - 2 Swap2
48      - 4 Swap4
49
5003.. - 7z
51   01 -
52      01 - LZMA
53
54   03 - [Branch Codecs]
55      01 - [x86 Codecs]
56         03  - BCJ
57         1B  - BCJ2 (4 packed streams)
58      02 -
59         05 - PPC (big-endian)
60      03 -
61         01 - Alpha
62      04 -
63         01 - IA64
64      05 -
65         01 - ARM (little-endian)
66      06 -
67         05 - M68 (big-endian)
68      07 -
69         01 - ARMT (little-endian)
70      08 -
71         05 - SPARC
72
73   04 -
74      01 - PPMD
75
76   7F -
77      01 - experimental method.
78
79
8004.. - Misc codecs
81
82   00 - Reserved
83
84   01 - [Zip]
85      00 - Copy (not used. Use {00} instead)
86      01 - Shrink
87      06 - Implode
88      08 - Deflate
89      09 - Deflate64
90      0A - Imploding
91      0C - BZip2 (not used. Use {040202} instead)
92      0E - LZMA (LZMA-zip)
93
94      5D - ZSTD
95      5F - xz
96      60 - Jpeg
97      61 - WavPack
98      62 - PPMd (PPMd-zip)
99      63 - wzAES
100
101   02 -
102      02 - BZip2
103
104   03 - [Rar]
105      01 - Rar1
106      02 - Rar2
107      03 - Rar3
108      05 - Rar5
109
110   04 - [Arj]
111      01 - Arj(1,2,3)
112      02 - Arj4
113
114   05 - [Z]
115
116   06 - [Lzh]
117
118   07 - Reserved for 7z
119
120   08 - [Cab]
121
122   09 - [NSIS]
123      01 - DeflateNSIS
124      02 - BZip2NSIS
125
126   F7 - External codecs (that are not included to 7-Zip)
127
128      0x xx - reserved
129
130      10 xx - reserved (LZHAM)
131         01 - LZHAM
132
133      11 xx - reserved (Tino Reichardt)
134         01 - ZSTD
135         02 - BROTLI
136         04 - LZ4
137         05 - LZ5
138         06 - LIZARD
139
140      12 xx - reserverd (Denis Anisimov)
141
142         01 - WavPack2
143         FE - eSplitter
144         FF - RawSplitter
145
146
14706.. - Crypto
148
149   F0 - Ciphers without hashing algo
150
151      01 - [AES]
152         0x - AES-128
153         4x - AES-192
154         8x - AES-256
155         Cx - AES
156
157         x0 - ECB
158         x1 - CBC
159         x2 - CFB
160         x3 - OFB
161         x4 - CTR
162
163   F1 - Combine Ciphers
164
165      01 - [Zip]
166         01 - ZipCrypto (Main Zip crypto algo)
167
168      03 - [RAR]
169         02 -
170         03 - Rar29AES (AES-128 + modified SHA-1)
171
172      07 - [7z]
173         01 - 7zAES (AES-256 + SHA-256)
174
175
176---
177End of document
178