1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
\r
4 <META http-equiv="Content-Type" content="text/html; charset=Windows-1252">
\r
5 <TITLE>-m (Set compression Method) switch</TITLE>
\r
6 <LINK href="style.css" rel="stylesheet" type="text/css">
\r
11 <H1>-m (Set compression Method) switch</H1>
\r
13 <P>Specifies the compression method.</P>
\r
17 <PRE class="syntax">
\r
18 -m<method_parameters>
\r
22 <P>The format for this switch depends on the archive type.</P>
\r
27 <TH width="160">Parameter</TH>
\r
28 <TH align="center">Default</TH>
\r
29 <TH>Description</TH> </TR>
\r
31 <TD><A class="parameter" href="#ZipX">x=[0 | 1 | 3 | 5 | 7 | 9 ]</A></TD>
\r
32 <TD align="center">5</TD>
\r
33 <TD>Sets level of compression.</TD> </TR>
\r
35 <TD>m={MethodID}</TD>
\r
36 <TD align="center">Deflate</TD>
\r
37 <TD>Sets a method: Copy, Deflate, Deflate64, BZip2, LZMA.</TD> </TR>
\r
39 <TD><A class="parameter" href="#Deflate_FastBytes">fb={NumFastBytes}</A></TD>
\r
40 <TD align="center">32</TD>
\r
41 <TD>Sets number of Fast Bytes for Deflate encoder.</TD> </TR>
\r
43 <TD><A class="parameter" href="#Zip_Pass">pass={NumPasses}</A></TD>
\r
44 <TD align="center">1</TD>
\r
45 <TD>Sets number of Passes for Deflate encoder.</TD></TR>
\r
47 <TD><A class="parameter" href="#ZipDictionarySize">d={Size}[b|k|m]</A></TD>
\r
48 <TD align="center">900000</TD>
\r
49 <TD>Sets Dictionary size for BZip2</TD></TR>
\r
51 <TD><A class="parameter" href="#ZipMultiThread">mt=[off | on | {N}]</A></TD>
\r
52 <TD align="center">on</TD>
\r
53 <TD>Sets multithreading mode.</TD></TR>
\r
55 <TD>em={EncryptionMethodID}</TD>
\r
56 <TD align="center">ZipCrypto</TD>
\r
57 <TD>Sets a encryption method: ZipCrypto, AES128, AES192, AES256</TD> </TR>
\r
58 <TR> <TD><A class="parameter">tc=[off | on]</A></TD>
\r
59 <TD align="center">off</TD> <TD>Stores NTFS timestamps for files: Modification time, Creation time, Last access time.</TD> </TR>
\r
60 <TR> <TD><A class="parameter">cl=[off | on]</A></TD>
\r
61 <TD align="center">off</TD> <TD>7-Zip always uses local code page for file names.</TD> </TR>
\r
62 <TR> <TD><A class="parameter">cu=[off | on]</A></TD>
\r
63 <TD align="center">off</TD> <TD>7-Zip uses UTF-8 for file names that contain non-ASCII symbols.</TD> </TR>
\r
66 <P>By default (if <B>cl</B> and <B>cu</B> switches are not specified), 7-Zip uses UTF-8 encoding
\r
67 only for file names that contain symbols unsupported by local code page.</P>
\r
70 <DT><A name="ZipX"></A>x=[0 | 1 | 3 | 5 | 7 | 9 ]</DT>
\r
72 <P>Sets level of compression. x=0 means Copy mode (no compression).</P>
\r
73 <P>Deflate / Deflate64 settings:</P>
\r
75 <TR> <TH>Level</TH> <TH>NumFastBytes</TH> <TH>NumPasses</TH> <TH>Description</TH> </TR>
\r
76 <TR> <TD class="cc">1</TD> <TD class="cc" rowspan=3>32</TD> <TD class="cc" rowspan=3>1</TD> <TD>Fastest</TD> </TR>
\r
77 <TR> <TD class="cc">3</TD> <TD>Fast</TR>
\r
78 <TR> <TD class="cc">5</TD> <TD>Normal</TR>
\r
79 <TR> <TD class="cc">7</TD> <TD class="cc">64</TD> <TD class="cc">3</TD> <TD>Maximum</TD> </TR>
\r
80 <TR> <TD class="cc">9</TD> <TD class="cc">128</TD> <TD class="cc">10</TD> <TD>Ultra</TD> </TR>
\r
83 <P>x=1 and x=3 with Deflate method set fast mode for compression.</P>
\r
85 <P>BZip2 settings:</P>
\r
87 <TR> <TH>Level</TH> <TH>Dictionary</TH> <TH>NumPasses</TH> <TH>Description</TH> </TR>
\r
88 <TR> <TD class="cc">1</TD> <TD class="cc">100000</TD> <TD class="cc" rowspan=3>1</TD> <TD>Fastest</TD> </TR>
\r
89 <TR> <TD class="cc">3</TD> <TD class="cc">500000</TD> <TD>Fast</TD> </TR>
\r
90 <TR> <TD class="cc">5</TD> <TD class="cc" rowspan=3>900000</TD> <TD>Normal</TD> </TR>
\r
91 <TR> <TD class="cc">7</TD> <TD align="center">2</TD> <TD>Maximum</TD> </TR>
\r
92 <TR> <TD class="cc">9</TD> <TD align="center">7</TD> <TD>Ultra</TD> </TR>
\r
96 <DT><A name="Deflate_FastBytes"></A>fb={NumFastBytes}</DT>
\r
98 <P>Sets the number of fast bytes for the Deflate/Deflate64 encoder.
\r
99 It can be in the range from 3 to 258 (257 for Deflate64).
\r
100 Usually, a big number gives a little bit better
\r
101 compression ratio and a slower compression process.
\r
102 A large fast bytes parameter can significantly increase the compression ratio
\r
103 for files which contain long identical sequences of bytes.</P>
\r
105 <DT><A name="Zip_Pass"></A>pass={NumPasses}</DT>
\r
107 <P>Sets number of passes for Deflate encoder. It can be in the range from 1 to 15 for Deflate and
\r
108 from 1 to 10 for BZip2. Usually, a big number gives a little bit better
\r
109 compression ratio and a slower compression process.
\r
112 <DT><A name="ZipDictionarySize"></A>d={Size}[b|k|m]</DT>
\r
114 <P> Sets the Dictionary size for BZip2. You must specify the size in bytes, kilobytes, or megabytes.
\r
115 The maximum value for the Dictionary size is 900000b. If you do not specify any symbol
\r
116 from set [b|k|m], dictionary size will be calculated as DictionarySize = 2^Size bytes.</P>
\r
118 <DT><A name="ZipMultiThread"></A>mt=[off | on | {N}]</DT>
\r
120 <P>Sets multithread mode. If you have a multiprocessor or multicore system,
\r
121 you can get a speed increase with
\r
122 this switch. This option affects only compression (with any method) and
\r
123 decompression of BZip2 streams.
\r
124 Each thread in the multithread mode uses 32 MB of RAM for buffering.
\r
125 If you specify {N}, 7-Zip tries to use N threads.</P>
\r
130 GZip uses the same parameters as Zip, but GZip compresses only with Deflate method.
\r
135 <TH width="160">Parameter</TH>
\r
136 <TH align="center">Default</TH>
\r
137 <TH>Description</TH> </TR>
\r
139 <TD><A class="parameter" href="#BZip2X">x=[1 | 3 | 5 | 7 | 9 ]</A></TD>
\r
140 <TD align="center">5</TD>
\r
141 <TD>Sets level of compression.</TD> </TR>
\r
143 <TD><A class="parameter" href="#BZip2Pass">pass={NumPasses}</A></TD>
\r
144 <TD align="center">1</TD>
\r
145 <TD>Sets number of Passes for Bzip2 encoder.</TD></TR>
\r
147 <TD><A class="parameter" href="#BZip2MultiThread">mt=[off | on | {N}]</A></TD>
\r
148 <TD align="center">on</TD>
\r
149 <TD>Sets multithreading mode.</TD></TR>
\r
153 <DT><A name="BZip2"></A>x=[1 | 3 | 5 | 7 | 9 ]</DT>
\r
155 <P>Sets level of compression</P>
\r
157 <TR> <TH>Level</TH> <TH>NumPasses</TH> <TH>Description</TH> </TR>
\r
158 <TR> <TD>5</TD> <TD align="center">1</TD> <TD>Default compression method.</TD> </TR>
\r
159 <TR> <TD>7</TD> <TD align="center">2</TD> <TD>Maximum compression method.</TD> </TR>
\r
160 <TR> <TD>9</TD> <TD align="center">7</TD> <TD>Ultra compression method.</TD> </TR>
\r
164 <DT><A name="#BZip2Pass"></A>pass={NumPasses}</DT>
\r
166 <P>Sets the number of passes. It can be in the range from 1 to 10.
\r
167 The default value is 1 for normal mode, 2 for maximum mode and 7 for ultra mode.
\r
168 A bigger number can give a little bit better compression ratio and a slower compression process.
\r
171 <DT><A name="BZip2MultiThread"></A>mt=[off | on | {N}]</DT>
\r
173 <P>Sets multithread mode. If you have a multiprocessor or multicore system,
\r
174 you can get a speed increase with
\r
175 this switch. If you specify {N}, for example mt=4, 7-Zip tries to use 4 threads.</P>
\r
181 <TR> <TH width="80">Parameter</TH> <TH align="center">Default</TH> <TH>Description</TH> </TR>
\r
182 <TR> <TD><A class="parameter" href="#SevenZipX">x=[0 | 1 | 3 | 5 | 7 | 9 ]</A></TD>
\r
183 <TD align="center">5</TD><TD>Sets level of compression.</TD> </TR>
\r
184 <TR> <TD><A class="parameter" href="#Solid">s=[off | on | [e] [{N}f] [{N}b | {N}k | {N}m | {N}g]</A></TD>
\r
185 <TD align="center">on</TD> <TD>Sets solid mode.</TD> </TR>
\r
186 <TR> <TD><A class="parameter" href="#Filter">f=[off | on]</A></TD>
\r
187 <TD align="center">on</TD> <TD>Enables or disables compression filters for executable files.</TD> </TR>
\r
188 <TR> <TD><A class="parameter" href="#HeaderCompress">hc=[off | on]</A></TD>
\r
189 <TD align="center">on</TD> <TD>Enables or disables archive header compressing.</TD> </TR>
\r
190 <TR> <TD><A class="parameter" href="#HeaderEncrypt">he=[off | on]</A></TD>
\r
191 <TD align="center">off</TD> <TD>Enables or disables archive header encryption.</TD> </TR>
\r
192 <TR> <TD><A class="parameter" href="#Bind">b{C1}[s{S1}]:{C2}[s{S2}]</A></TD>
\r
193 <TD align="center"> </TD> <TD>Sets binding beetwen coders.</TD> </TR>
\r
194 <TR> <TD><A class="parameter" href="#MethodID">{N}={MethodID}[:param1][:param2][..]</A></TD>
\r
195 <TD align="center">LZMA</TD> <TD>Sets a method: LZMA, PPMd, BZip2, Deflate, BCJ, BCJ2, Copy.</TD> </TR>
\r
196 <TR> <TD><A class="parameter" href="#MultiThread">mt=[off | on | {N}]</A></TD>
\r
197 <TD align="center">on</TD> <TD>Sets multithreading mode.</TD> </TR>
\r
198 <TR> <TD><A class="parameter">tc=[off | on]</A></TD>
\r
199 <TD align="center">off</TD> <TD>Stores file creation timestamps.</TD> </TR>
\r
203 <DT><A name="SevenZipX"></A>x=[0 | 1 | 3 | 5 | 7 | 9 ]</DT>
\r
205 <P>Sets level of compression</P>
\r
207 <TR> <TH>Level</TH> <TH>Method</TH> <TH>Dictionary</TH> <TH>FastBytes</TH> <TH>MatchFinder</TH> <TH>Filter</TH> <TH>Description</TH> </TR>
\r
208 <TR> <TD align="center">0</TD> <TD align="center">Copy</TD> <TD align="center"></TD> <TD align="center"></TD> <TD align="center"></TD> <TD align="center"></TD> <TD>No compression.</TD> </TR>
\r
209 <TR> <TD align="center">1</TD> <TD align="center">LZMA</TD> <TD align="center">64 KB</TD> <TD align="center">32</TD> <TD align="center">HC4</TD> <TD align="center">BCJ</TD> <TD>Fastest compressing</TD> </TR>
\r
210 <TR> <TD align="center">3</TD> <TD align="center">LZMA</TD> <TD align="center">1 MB</TD> <TD align="center">32</TD> <TD align="center">HC4</TD> <TD align="center">BCJ</TD> <TD>Fast compressing</TD> </TR>
\r
211 <TR> <TD align="center">5</TD> <TD align="center">LZMA</TD> <TD align="center">16 MB</TD> <TD align="center">32</TD> <TD align="center">BT4</TD> <TD align="center">BCJ</TD> <TD>Normal compressing</TD> </TR>
\r
212 <TR> <TD align="center">7</TD> <TD align="center">LZMA</TD> <TD align="center">32 MB</TD> <TD align="center">64</TD> <TD align="center">BT4</TD> <TD align="center">BCJ</TD> <TD>Maximum compressing</TD> </TR>
\r
213 <TR> <TD align="center">9</TD> <TD align="center">LZMA</TD> <TD align="center">64 MB</TD> <TD align="center">64</TD> <TD align="center">BT4</TD> <TD align="center">BCJ2</TD><TD>Ultra compressing</TD> </TR>
\r
217 <DT><A name="Solid"></A>s=[off | on | [e] [{N}f] [{N}b | {N}k | {N}m | {N}g)]</DT>
\r
219 <P> Enables or disables solid mode. The default mode is s=on.
\r
220 In solid mode, files are grouped together. Usually, compressing in
\r
221 solid mode improves the compression ratio.</P>
\r
224 <TR> <TD>e</TD> <TD>Use a separate solid block for each new file extension</TD> </TR>
\r
225 <TR> <TD>{N}f</TD> <TD>Set the limit for number of files in one solid block</TD> </TR>
\r
226 <TR> <TD>{N}b | {N}k | {N}m | {N}g</TD> <TD>Set a limit for the total size of a solid block in bytes</TD> </TR>
\r
229 <P>These are the default limits for the solid block size:</P>
\r
232 <TR> <TH width="150">Compression Level</TH> <TH>Solid block size</TH> </TR>
\r
233 <TR> <TD>Store</TD> <TD>0 B</TD> </TR>
\r
234 <TR> <TD>Fastest</TD> <TD>16 MB</TD> </TR>
\r
235 <TR> <TD>Fast</TD> <TD>128 MB</TD> </TR>
\r
236 <TR> <TD>Normal</TD> <TD>2 GB</TD> </TR>
\r
237 <TR> <TD>Maximum</TD> <TD>4 GB</TD> </TR>
\r
238 <TR> <TD>Ultra</TD> <TD>4 GB</TD> </TR>
\r
242 <P>Limitation of the solid block size usually decreases compression ratio but gives the following advantages:</P>
\r
244 <LI>Decreases losses in case of future archive damage.
\r
245 <LI>Decreases extraction time of a group of files (or just one
\r
246 file), so long as the group doesn't contain the entire archive.</LI></LI>
\r
248 <P>The current version of 7-Zip doesn't support updating of solid
\r
249 archives, if it requires repacking solid blocks.</P>
\r
252 <PRE class="example">
\r
255 <P>set solid mode with 100 files & 10 MB limits per one solid block.</P>
\r
257 <DT><A name="Filter"></A>f=[off | on]</DT>
\r
259 <P>Enables or disables compression filters for executable files:
\r
260 dll, exe, ocx, sfx, sys. It uses BCJ2 filter in Ultra mode and BCJ
\r
261 filter in other modes. The default mode is f=on.
\r
263 <DT><A name="HeaderCompress"></A>hc=[off | on]</DT>
\r
265 <P> Enables or disables archive header compressing. The default mode is hc=on.
\r
266 If archive header compressing is enabled, some parts of archive header will
\r
267 be compressed with LZMA method.
\r
269 <DT><A name="HeaderEncrypt"></A>he=[off | on]</DT>
\r
271 <P> Enables or disables archive header encryption. The default mode is he=off.
\r
275 <P>Sets order of methods. It is used also to associate parameters with
\r
276 methods. Numbers must begin from 0. Methods that have smaller numbers will be used
\r
280 <DT><A name="Bind"></A>b{C1}[s{S1}]:{C2}[s{S2}]</DT>
\r
282 <P> Binds output stream S1 in coder C1 with input stream S2 in coder C2.
\r
283 If stream number is not specified, stream with number 0 will be used.
\r
285 <P> Usally coder has one input stream and
\r
286 one output stream. In 7z some coders can have multiple input and output streams.</P>
\r
288 <P>For example, <A class="parameter" href="#BCJ2">BCJ2</A> encoder has one
\r
289 input stream and four output streams.</P>
\r
292 <DT><A name="MultiThread"></A>mt=[off | on | {N}]</DT>
\r
294 <P>Sets multithread mode. If you have a multiprocessor or multicore system,
\r
295 you can get a increase with this switch.
\r
296 7-Zip supports multithread mode only for LZMA compression and
\r
297 BZip2 compression / decompression. If you specify {N}, for example mt=4,
\r
298 7-Zip tries to use 4 threads. LZMA compression uses only 2 threads.
\r
302 <DT><A name="MethodID"></A>{N}={MethodID}[:param1][:param2] ... [:paramN]</DT>
\r
304 <P>Sets compression method. You can use any number of methods.
\r
305 The default method is LZMA. </P>
\r
306 <P>Parameters must be in one of the following forms:</P>
\r
308 <LI>{ParamName}={ParamValue}.
\r
309 <LI>{ParamName}{ParamValue}, if {ParamValue}
\r
310 is number and {ParamName} doesn't contain numbers.
\r
313 <P>Supported methods:</P>
\r
315 <TR> <TH width="60">MethodID</TH> <TH>Description</TH> </TR>
\r
316 <TR> <TD><A class="parameter" href="#LZMA">LZMA</A></TD> <TD>Algorithm based on LZ algorithm</TD> </TR>
\r
317 <TR> <TD><A class="parameter" href="#PPMd">PPMd</A></TD> <TD>Dmitry Shkarin's PPMdH with small changes</TD> </TR>
\r
318 <TR> <TD>BZip2</TD> <TD>BWT algorithm</TD> </TR>
\r
319 <TR> <TD>Deflate</TD> <TD>LZ+Huffman</TD> </TR>
\r
320 <TR> <TD>Copy</TD> <TD>No compression</TD> </TR>
\r
323 <P>Supported filters:</P>
\r
325 <TR> <TH width="60">MethodID</TH> <TH>Description</TH> </TR>
\r
326 <TR> <TD>BCJ</TD> <TD>converter for x86 executables</TD> </TR>
\r
327 <TR> <TD><A class="parameter" href="#BCJ2">BCJ2</A></TD> <TD>converter for x86 executables (version 2)</TD> </TR>
\r
328 <TR> <TD>ARM</TD> <TD>converter for ARM (little endian) executables</TD> </TR>
\r
329 <TR> <TD>ARMT</TD> <TD>converter for ARM Thumb (little endian) executables</TD> </TR>
\r
330 <TR> <TD>IA64</TD> <TD>converter for IA-64 executables</TD> </TR>
\r
331 <TR> <TD>PPC</TD> <TD>converter for PowerPC (big endian) executables</TD> </TR>
\r
332 <TR> <TD>SPARC</TD> <TD>converter for SPARC executables</TD> </TR>
\r
334 <P>Filters increase the compression ratio for some types of files. Filters
\r
335 must be used with one of the compression method (for example, BCJ + LZMA).</P>
\r
338 <H4><A name="LZMA"></A>LZMA</H4>
\r
339 <P> LZMA is an algorithm based on Lempel-Ziv algorithm.
\r
340 It provides very fast decompression (about 10-20 times faster than compression).
\r
341 Memory requirements for compression and decompression also are different (see
\r
342 <A class="parameter" href="#DictionarySize">d={Size}[b|k|m]</A> switch for details).</P>
\r
345 <TR> <TH width="80">Parameter</TH> <TH align="center">Default</TH> <TH>Description</TH> </TR>
\r
347 <TR> <TD><A class="parameter" href="#LZMAMode">a=[0|1]</A></TD>
\r
348 <TD align="center">1</TD> <TD>Sets compressing mode</TD> </TR>
\r
349 <TR> <TD><A class="parameter" href="#DictionarySize">d={Size}[b|k|m]</A></TD>
\r
350 <TD align="center">24</TD> <TD>Sets Dictionary size</TD> </TR>
\r
351 <TR> <TD><A class="parameter" href="#MatchFinder">mf={MF_ID}</A></TD>
\r
352 <TD align="center">bt4</TD> <TD>Sets Match Finder</TD> </TR>
\r
353 <TR> <TD><A class="parameter" href="#FastBytes">fb={N}</A></TD>
\r
354 <TD align="center">32</TD> <TD>Sets number of Fast Bytes</TD></TR>
\r
355 <TR> <TD><A class="parameter" href="#MatchFinderCycles">mc={N}</A></TD>
\r
356 <TD align="center">32</TD><TD>Sets Number of Cycles for Match Finder</TD> </TR>
\r
357 <TR> <TD><A class="parameter" href="#LitContext">lc={N}</A></TD>
\r
358 <TD align="center">3</TD> <TD>Sets number of Literal Context bits - [0, 8]</TD></TR>
\r
359 <TR> <TD><A class="parameter" href="#LitPos">lp={N}</A></TD>
\r
360 <TD align="center">0</TD> <TD>Sets number of Literal Pos bits - [0, 4]</TD></TR>
\r
361 <TR> <TD><A class="parameter" href="#PosBits">pb={N}</A></TD>
\r
362 <TD align="center">2</TD> <TD>Set number of Pos Bits - [0, 4]</TD></TR>
\r
367 <DT><A name="#LZMAMode"></A>a=[0|1]</DT>
\r
369 <P> Sets compression mode: 0 = fast, 1 = normal.
\r
370 Default value is 1.</P>
\r
372 <DT><A name="DictionarySize"></A>d={Size}[b|k|m]</DT>
\r
374 <P> Sets Dictionary size for LZMA. You must specify the size in bytes, kilobytes, or megabytes.
\r
375 The maximum value for dictionary size is 1 GB = 2^30 bytes. Default values for LZMA
\r
376 are 24 (16 MB) in normal mode, 25 (32 MB) in maximum mode (-mx=7)
\r
377 and 26 (64 MB) in ultra mode (-mx=9).
\r
378 If you do not specify any symbol from the set [b|k|m], the
\r
379 dictionary size will be calculated as DictionarySize = 2^Size bytes.
\r
380 For decompressing a file compressed by LZMA method with dictionary size N, you need
\r
381 about N bytes of memory (RAM) available.
\r
384 <DT><A name="MatchFinder"></A>mf={MF_ID}</DT>
\r
386 <P> Sets Match Finder for LZMA. Default method is bt4.
\r
387 Algorithms from hc* group don't provide a good compression ratio,
\r
388 but they often work pretty fast in combination with fast mode (a=0).
\r
389 Memory requirements depend on dictionary size (parameter "d" in table below).
\r
392 <TR> <TH width="60">MF_ID</TH> <TH width="120">Memory</TH> <TH>Description</TH> </TR>
\r
393 <TR> <TD>bt2</TD> <TD>d*9.5 + 4 MB</TD> <TD>Binary Tree with 2 bytes hashing.</TD> </TR>
\r
394 <TR> <TD>bt3</TD> <TD>d*11.5 + 4 MB</TD> <TD>Binary Tree with 3 bytes hashing.</TD> </TR>
\r
395 <TR> <TD>bt4</TD> <TD>d*11.5 + 4 MB</TD> <TD>Binary Tree with 4 bytes hashing.</TD> </TR>
\r
396 <TR> <TD>hc4</TD> <TD>d*7.5 + 4 MB</TD> <TD>Hash Chain with 4 bytes hashing.</TD> </TR>
\r
398 <P>Note: Your operation system also needs some amount of physical memory for internal purposes.
\r
399 So keep at least 32MB of physical memory unused.</P>
\r
402 <DT><A name="FastBytes"></A>fb={N}</DT>
\r
404 <P>Sets number of fast bytes for LZMA. It can be in the range from 5 to 273.
\r
405 The default value is 32 for normal mode and 64 for maximum and ultra modes.
\r
406 Usually, a big number gives a little bit better
\r
407 compression ratio and slower compression process.
\r
410 <DT><A name="MatchFinderCycles"></A>mc={N}</DT>
\r
412 <P>Sets number of cycles (passes) for match finder. It can be in range from 0 to 1000000000.
\r
413 Default value is (16 + number_of_fast_bytes / 2) for BT* match finders and
\r
414 (8 + number_of_fast_bytes / 4) for HC4 match finder.
\r
415 If you specify mc=0, LZMA will use default value.
\r
416 Usually, a big number gives a little bit better compression ratio and slower
\r
417 compression process. For example, mf=HC4 and mc=10000 can provide almost the same
\r
418 compression ratio as mf=BT4.</P>
\r
420 <DT><A name="LitContext"></A>lc={N}</DT>
\r
422 <P>Sets the number of literal context bits (high bits of previous literal).
\r
423 It can be in range from 0 to 8.
\r
424 Default value is 3. Sometimes lc=4 gives gain for big files.</P>
\r
426 <DT><A name="LitPos"></A>lp={N}</DT>
\r
428 <P>Sets the number of literal pos bits (low bits of current position for literals).
\r
429 It can be in the range from 0 to 4.
\r
430 The default value is 0. The lp switch is intended for periodical data when the
\r
431 period is equal to 2^value (where lp=value). For example, for 32-bit (4 bytes)
\r
432 periodical data you can use lp=2. Often it's better to set lc=0,
\r
433 if you change lp switch.</P>
\r
435 <DT><A name="PosBits"></A>pb={N}</DT>
\r
437 <P>Sets the number of pos bits (low bits of current position).
\r
438 It can be in the range from 0 to 4.
\r
439 The default value is 2. The pb switch is intended for periodical data when the
\r
440 period is equal 2^value (where lp=value). </P>
\r
445 <H4><A name="PPMd"></A>PPMd</H4>
\r
446 <P> PPMd is a PPM-based algorithm. This algorithm is mostly based
\r
447 on Dmitry Shkarin's PPMdH source code. PPMd provides very good compression ratio for
\r
448 plain text files. There is no difference between compression speed and
\r
449 decompression speed. Memory requirements for compression and decompression
\r
450 also are the same.</P>
\r
452 <TR> <TH width="80">Parameter</TH> <TH align="center">Default</TH> <TH>Description</TH> </TR>
\r
453 <TR> <TD><A class="parameter" href="#MemorySize">mem={Size}[b|k|m]</A></TD>
\r
454 <TD align="center">24</TD> <TD>Sets size of used memory for PPMd.</TD> </TR>
\r
455 <TR> <TD><A class="parameter" href="#Order">o={Size}</A></TD>
\r
456 <TD align="center">6</TD> <TD>Sets model order for PPMd.</TD> </TR>
\r
459 <DT><A name="MemorySize"></A>mem={Size}[b|k|m]</DT>
\r
461 <P> Sets the size of memory used for PPMd. You must specify the size in bytes, kilobytes, or megabytes.
\r
462 The maximum value is 2GB = 2^31 bytes. The default value
\r
463 is 24 (16MB). If you do not specify any symbol from the set [b|k|m], the
\r
464 memory size will be calculated as (2^Size) bytes. PPMd uses the same
\r
465 amount of memory for compression and decompression.</P>
\r
468 <DT><A name="Order"></A>o={Size}</DT>
\r
470 <P>Sets the model order for PPMd. The size must be in the range [2,32]. The default value is 6.</P>
\r
474 <H4><A name="BCJ2"></A>BCJ2</H4>
\r
475 <P>BCJ2 is a Branch converter for 32-bit x86 executables (version 2).
\r
476 It converts some branch instructions for increasing further compression.</P>
\r
477 <P>A BCJ2 encoder has one input stream and four output streams:</P>
\r
479 <LI>s0: main stream. It requires further compression.</LI>
\r
480 <LI>s1: stream for converted CALL values. It requires further compression.</LI>
\r
481 <LI>s2: stream for converted JUMP values. It requires further compression.</LI>
\r
482 <LI>s3: service stream. It is already compressed.</LI>
\r
484 <P>If LZMA is used, the size of the dictionary for streams
\r
485 s1 and s2 can be much smaller (512 KB is enough for most cases)
\r
486 than the dictionary size for stream s0.</P>
\r
492 <PRE class="example">
\r
493 7z a -tzip archive.zip *.jpg -mx0
\r
496 <P>adds <SPAN class="filename">*.jpg</SPAN> files to
\r
497 <SPAN class="filename">archive.zip</SPAN> archive without compression.</P>
\r
499 <PRE class="example">
\r
500 7z a -t7z archive.7z *.exe *.dll -m0=BCJ -m1=LZMA:d=21 -ms -mmt
\r
503 <P>adds <SPAN class="filename">*.exe</SPAN> and <SPAN class="filename">*.dll</SPAN>
\r
504 files to solid archive <SPAN class="filename">archive.7z</SPAN> using LZMA method with
\r
505 2 MB dictionary and BCJ converter. Compression will use multithreading optimization.</P>
\r
507 <PRE class="example">
\r
508 7z a -t7z archive.7z *.exe *.dll -m0=BCJ2 -m1=LZMA:d23 -m2=LZMA:d19 -m3=LZMA:d19
\r
509 -mb0:1 -mb0s1:2 -mb0s2:3
\r
512 <P>adds <SPAN class="filename">*.exe</SPAN> and <SPAN class="filename">*.dll</SPAN>
\r
513 files to archive <SPAN class="filename">archive.7z</SPAN> using BCJ2 converter,
\r
514 LZMA with 8 MB dictionary for main output stream (s0),
\r
515 and LZMA with 512 KB dictionary for s1 and s2 output streams of BCJ2.</P>
\r
518 <PRE class="example">
\r
519 7z a -t7z archive.7z *.txt -m0=PPMd
\r
522 <P>adds <SPAN class="filename">*.txt</SPAN> files to archive
\r
523 <SPAN class="filename">archive.7z</SPAN> using PPMd method.</P>
\r
528 <H4>Commands that can be used with this switch</H4>
\r
531 <A href="../commands/add.htm">a (Add)</A>,
\r
532 <A href="../commands/delete.htm">d (Delete)</A>,
\r
533 <A href="../commands/update.htm">u (Update)</A>,
\r
540 <A href="type.htm">-t (set Type of archive)</A>,
\r