OSDN Git Service

5eef397c1b39307e038f4a2c04c6288961af5b9e
[sevenzip/7-Zip.git] / chm / cmdline / switches / method.htm
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\r
2 <HTML>\r
3 <HEAD>\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
7 </HEAD>\r
8 \r
9 <BODY>\r
10 \r
11 <H1>-m (Set compression Method) switch</H1>\r
12 \r
13 <P>Specifies the compression method.</P>\r
14 \r
15 <H4>Syntax</H4>\r
16 \r
17 <PRE class="syntax">\r
18 -m&lt;method_parameters>\r
19 \r
20 </PRE>\r
21 \r
22 <P>The format for this switch depends on the archive type.</P>\r
23 \r
24 <H4>Zip</H4>\r
25 <TABLE>\r
26   <TR> \r
27     <TH width="160">Parameter</TH> \r
28     <TH align="center">Default</TH> \r
29     <TH>Description</TH> </TR>\r
30   <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
34   <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
38   <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
42   <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
46   <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
50   <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
54   <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
64 </TABLE>\r
65 \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
68 \r
69 <DL>\r
70   <DT><A name="ZipX"></A>x=[0 | 1 | 3 | 5 | 7 | 9 ]</DT>\r
71   <DD>\r
72     <P>Sets level of compression. x=0 means Copy mode (no compression).</P>\r
73     <P>Deflate / Deflate64 settings:</P>\r
74     <TABLE>\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
81     </TABLE>\r
82 \r
83     <P>x=1 and x=3 with Deflate method set fast mode for compression.</P>\r
84 \r
85     <P>BZip2 settings:</P>\r
86     <TABLE>\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
93     </TABLE>\r
94   </DD>\r
95 \r
96   <DT><A name="Deflate_FastBytes"></A>fb={NumFastBytes}</DT>\r
97   <DD>\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
104   </DD>\r
105   <DT><A name="Zip_Pass"></A>pass={NumPasses}</DT>\r
106   <DD>\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
110     </P>\r
111   </DD>\r
112   <DT><A name="ZipDictionarySize"></A>d={Size}[b|k|m]</DT>\r
113   <DD>\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
117   </DD>\r
118   <DT><A name="ZipMultiThread"></A>mt=[off | on | {N}]</DT>\r
119   <DD>\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
126   </DD>\r
127 </DL>\r
128 \r
129 <H4>GZip</H4>\r
130 GZip uses the same parameters as Zip, but GZip compresses only with Deflate method.\r
131 \r
132 <H4>BZip2</H4>\r
133 <TABLE>\r
134   <TR> \r
135     <TH width="160">Parameter</TH> \r
136     <TH align="center">Default</TH> \r
137     <TH>Description</TH> </TR>\r
138   <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
142   <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
146   <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
150 </TABLE>\r
151 \r
152 <DL>\r
153   <DT><A name="BZip2"></A>x=[1 | 3 | 5 | 7 | 9 ]</DT>\r
154   <DD>\r
155     <P>Sets level of compression</P>\r
156     <TABLE>\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
161     </TABLE>\r
162   </DD>\r
163 \r
164   <DT><A name="#BZip2Pass"></A>pass={NumPasses}</DT>\r
165   <DD>\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
169     </P>\r
170   </DD>\r
171   <DT><A name="BZip2MultiThread"></A>mt=[off | on | {N}]</DT>\r
172   <DD>\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
176   </DD>\r
177 </DL>\r
178 \r
179 <H4>7z</H4>\r
180 <TABLE>\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
200 </TABLE>\r
201 \r
202 <DL>\r
203   <DT><A name="SevenZipX"></A>x=[0 | 1 | 3 | 5 | 7 | 9 ]</DT>\r
204   <DD>\r
205     <P>Sets level of compression</P>\r
206     <TABLE>\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
214     </TABLE>\r
215   </DD>\r
216 \r
217   <DT><A name="Solid"></A>s=[off | on | [e] [{N}f] [{N}b | {N}k | {N}m | {N}g)]</DT>\r
218   <DD>\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
222 \r
223     <TABLE>\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
227     </TABLE>\r
228 \r
229     <P>These are the default limits for the solid block size:</P>\r
230 \r
231     <TABLE>\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
239     </TABLE>\r
240 \r
241 \r
242     <P>Limitation of the solid block size usually decreases compression ratio but gives the following advantages:</P>\r
243     <UL>\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
247     </UL>\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
250 \r
251     <P>Example:</P>\r
252       <PRE class="example">\r
253         s=100f10m\r
254       </PRE>\r
255     <P>set solid mode with 100 files & 10 MB limits per one solid block.</P>\r
256 \r
257   <DT><A name="Filter"></A>f=[off | on]</DT>\r
258   <DD>\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
262     </P>\r
263   <DT><A name="HeaderCompress"></A>hc=[off | on]</DT>\r
264   <DD>\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
268     </P>\r
269   <DT><A name="HeaderEncrypt"></A>he=[off | on]</DT>\r
270   <DD>\r
271     <P> Enables or disables archive header encryption. The default mode is he=off. \r
272     </P>\r
273   <DT>{N}</DT>\r
274   <DD>\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
277         before others.</P>\r
278   </DD>\r
279 \r
280   <DT><A name="Bind"></A>b{C1}[s{S1}]:{C2}[s{S2}]</DT>\r
281   <DD>\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
284         </P>\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
287 \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
290   </DD>\r
291 \r
292   <DT><A name="MultiThread"></A>mt=[off | on | {N}]</DT>\r
293   <DD>\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
299     </P>\r
300   </DD>\r
301   \r
302   <DT><A name="MethodID"></A>{N}={MethodID}[:param1][:param2] ... [:paramN]</DT>\r
303   <DD>\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
307     <UL>\r
308       <LI>{ParamName}={ParamValue}.\r
309       <LI>{ParamName}{ParamValue}, if {ParamValue} \r
310         is number and {ParamName} doesn't contain numbers.\r
311     </UL>\r
312         \r
313     <P>Supported methods:</P>\r
314     <TABLE>\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
321     </TABLE>\r
322 \r
323     <P>Supported filters:</P>\r
324     <TABLE>\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
333     </TABLE>\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
336   </DD>\r
337 \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
343 \r
344  <TABLE>\r
345    <TR> <TH width="80">Parameter</TH> <TH align="center">Default</TH> <TH>Description</TH> </TR>\r
346 \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
363  </TABLE>\r
364 \r
365  \r
366  <DL>\r
367   <DT><A name="#LZMAMode"></A>a=[0|1]</DT>\r
368   <DD>\r
369     <P> Sets compression mode: 0 = fast, 1 = normal.\r
370       Default value is 1.</P>\r
371   </DD>\r
372   <DT><A name="DictionarySize"></A>d={Size}[b|k|m]</DT>\r
373   <DD>\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
382        </P>\r
383   </DD>\r
384   <DT><A name="MatchFinder"></A>mf={MF_ID}</DT>\r
385   <DD>\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
390     </P>\r
391     <TABLE>\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
397     </TABLE>\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
400   </DD>\r
401   \r
402   <DT><A name="FastBytes"></A>fb={N}</DT>\r
403   <DD>\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
408        </P>\r
409   </DD>\r
410   <DT><A name="MatchFinderCycles"></A>mc={N}</DT>\r
411   <DD>\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
419   </DD>\r
420   <DT><A name="LitContext"></A>lc={N}</DT>\r
421   <DD>\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
425   </DD>\r
426   <DT><A name="LitPos"></A>lp={N}</DT>\r
427   <DD>\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
434   </DD>\r
435   <DT><A name="PosBits"></A>pb={N}</DT>\r
436   <DD>\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
441   </DD>\r
442   \r
443  </DL>\r
444   \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
451  <TABLE>\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
457  </TABLE>\r
458  <DL>\r
459   <DT><A name="MemorySize"></A>mem={Size}[b|k|m]</DT>\r
460   <DD>\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
466   </DD>\r
467   \r
468   <DT><A name="Order"></A>o={Size}</DT>\r
469   <DD>\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
471   </DD>\r
472  </DL>\r
473 \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
478  <UL>\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
483  </UL>\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
487 \r
488 </DL>\r
489 \r
490 <H4>Examples</H4>\r
491 \r
492 <PRE class="example">\r
493 7z a -tzip archive.zip *.jpg -mx0\r
494 </PRE>\r
495 \r
496 <P>adds <SPAN class="filename">*.jpg</SPAN> files to\r
497   <SPAN class="filename">archive.zip</SPAN> archive without compression.</P>\r
498 \r
499 <PRE class="example">\r
500 7z a -t7z archive.7z *.exe *.dll -m0=BCJ -m1=LZMA:d=21 -ms -mmt\r
501 </PRE>\r
502 \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
506 \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
510 </PRE>\r
511 \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
516 \r
517   \r
518 <PRE class="example">\r
519 7z a -t7z archive.7z *.txt -m0=PPMd\r
520 </PRE>\r
521 \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
524 \r
525 \r
526 \r
527 \r
528 <H4>Commands that can be used with this switch</H4>\r
529 \r
530 <P>\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
534 </P>\r
535 \r
536 <H4>See also</H4>\r
537 \r
538 <P>\r
539   <B>Switches:</B>\r
540   <A href="type.htm">-t (set Type of archive)</A>,\r
541 </P>\r
542 \r
543 </BODY>\r
544 </HTML>\r