Mercurial > repo
comparison p7zip_9.20.1/DOCS/MANUAL/switches/method.htm @ 707:8e902fcb8792
<Sgeo> run tar -xjf p7zip.tar.bz2
author | HackBot |
---|---|
date | Sat, 15 Sep 2012 23:18:55 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
706:1cf2de42d323 | 707:8e902fcb8792 |
---|---|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> | |
2 <HTML> | |
3 <HEAD> | |
4 <META http-equiv="Content-Type" content="text/html; charset=Windows-1252"> | |
5 <TITLE>-m (Set compression Method) switch</TITLE> | |
6 <LINK href="style.css" rel="stylesheet" type="text/css"> | |
7 </HEAD> | |
8 | |
9 <BODY> | |
10 | |
11 <H1>-m (Set compression Method) switch</H1> | |
12 | |
13 <P>Specifies the compression method.</P> | |
14 | |
15 <H4>Syntax</H4> | |
16 | |
17 <PRE class="syntax"> | |
18 -m<method_parameters> | |
19 | |
20 </PRE> | |
21 | |
22 <P>The format for this switch depends on the archive type.</P> | |
23 | |
24 <UL> | |
25 <LI><TD><A class="parameter" href="#Zip">Zip</A></TD> | |
26 <LI><TD><A class="parameter" href="#GZ">GZip</A></TD> | |
27 <LI><TD><A class="parameter" href="#BZ2">BZip2</A></TD> | |
28 <LI><TD><A class="parameter" href="#7Z">7z</A></TD> | |
29 <LI><TD><A class="parameter" href="#XZ">XZ</A></TD> | |
30 </UL> | |
31 | |
32 <H2><A name="Zip"></A>Zip</H2> | |
33 <TABLE> | |
34 <TR> | |
35 <TH width="160">Parameter</TH> | |
36 <TH align="center">Default</TH> | |
37 <TH>Description</TH> </TR> | |
38 <TR> | |
39 <TD><A class="parameter" href="#ZipX">x=[0 | 1 | 3 | 5 | 7 | 9 ]</A></TD> | |
40 <TD align="center">5</TD> | |
41 <TD>Sets level of compression.</TD> </TR> | |
42 <TR> | |
43 <TD>m={MethodID}</TD> | |
44 <TD align="center">Deflate</TD> | |
45 <TD>Sets a method: Copy, Deflate, Deflate64, BZip2, LZMA, PPMd.</TD> </TR> | |
46 <TR> | |
47 <TD><A class="parameter" href="#Deflate_FastBytes">fb={NumFastBytes}</A></TD> | |
48 <TD align="center">32</TD> | |
49 <TD>Sets number of Fast Bytes for Deflate encoder.</TD> </TR> | |
50 <TR> | |
51 <TD><A class="parameter" href="#Zip_Pass">pass={NumPasses}</A></TD> | |
52 <TD align="center">1</TD> | |
53 <TD>Sets number of Passes for Deflate encoder.</TD></TR> | |
54 <TR> | |
55 <TD><A class="parameter" href="#ZipDictionarySize">d={Size}[b|k|m]</A></TD> | |
56 <TD align="center">900000</TD> | |
57 <TD>Sets Dictionary size for BZip2</TD></TR> | |
58 <TR> | |
59 <TD><A class="parameter" href="#ZipMemorySize">mem={Size}[b|k|m]</A></TD> | |
60 <TD align="center">24</TD> <TD>Sets size of used memory for PPMd.</TD></TR> | |
61 <TR> | |
62 <TD><A class="parameter" href="#ZipOrder">o={Size}</A></TD> | |
63 <TD align="center">8</TD> <TD>Sets model order for PPMd.</TD></TR> | |
64 <TR> | |
65 <TD><A class="parameter" href="#ZipMultiThread">mt=[off | on | {N}]</A></TD> | |
66 <TD align="center">on</TD> | |
67 <TD>Sets multithreading mode.</TD></TR> | |
68 <TR> | |
69 <TD>em={EncryptionMethodID}</TD> | |
70 <TD align="center">ZipCrypto</TD> | |
71 <TD>Sets a encryption method: ZipCrypto, AES128, AES192, AES256</TD> </TR> | |
72 <TR> <TD><A class="parameter">tc=[off | on]</A></TD> | |
73 <TD align="center">off</TD> <TD>Stores NTFS timestamps for files: Modification time, Creation time, Last access time.</TD> </TR> | |
74 <TR> <TD><A class="parameter">cl=[off | on]</A></TD> | |
75 <TD align="center">off</TD> <TD>7-Zip always uses local code page for file names.</TD> </TR> | |
76 <TR> <TD><A class="parameter">cu=[off | on]</A></TD> | |
77 <TD align="center">off</TD> <TD>7-Zip uses UTF-8 for file names that contain non-ASCII symbols.</TD> </TR> | |
78 </TABLE> | |
79 | |
80 <P>By default (if <B>cl</B> and <B>cu</B> switches are not specified), 7-Zip uses UTF-8 encoding | |
81 only for file names that contain symbols unsupported by local code page.</P> | |
82 | |
83 <DL> | |
84 <DT><A name="ZipX"></A>x=[0 | 1 | 3 | 5 | 7 | 9 ]</DT> | |
85 <DD> | |
86 <P>Sets level of compression. x=0 means Copy mode (no compression).</P> | |
87 <P>Deflate / Deflate64 settings:</P> | |
88 <TABLE> | |
89 <TR> <TH>Level</TH> <TH>NumFastBytes</TH> <TH>NumPasses</TH> <TH>Description</TH> </TR> | |
90 <TR> <TD class="cc">1</TD> <TD class="cc" rowspan=3>32</TD> <TD class="cc" rowspan=3>1</TD> <TD>Fastest</TD> </TR> | |
91 <TR> <TD class="cc">3</TD> <TD>Fast</TR> | |
92 <TR> <TD class="cc">5</TD> <TD>Normal</TR> | |
93 <TR> <TD class="cc">7</TD> <TD class="cc">64</TD> <TD class="cc">3</TD> <TD>Maximum</TD> </TR> | |
94 <TR> <TD class="cc">9</TD> <TD class="cc">128</TD> <TD class="cc">10</TD> <TD>Ultra</TD> </TR> | |
95 </TABLE> | |
96 | |
97 <P>x=1 and x=3 with Deflate method set fast mode for compression.</P> | |
98 | |
99 <P>BZip2 settings:</P> | |
100 <TABLE> | |
101 <TR> <TH>Level</TH> <TH>Dictionary</TH> <TH>NumPasses</TH> <TH>Description</TH> </TR> | |
102 <TR> <TD class="cc">1</TD> <TD class="cc">100000</TD> <TD class="cc" rowspan=3>1</TD> <TD>Fastest</TD> </TR> | |
103 <TR> <TD class="cc">3</TD> <TD class="cc">500000</TD> <TD>Fast</TD> </TR> | |
104 <TR> <TD class="cc">5</TD> <TD class="cc" rowspan=3>900000</TD> <TD>Normal</TD> </TR> | |
105 <TR> <TD class="cc">7</TD> <TD align="center">2</TD> <TD>Maximum</TD> </TR> | |
106 <TR> <TD class="cc">9</TD> <TD align="center">7</TD> <TD>Ultra</TD> </TR> | |
107 </TABLE> | |
108 </DD> | |
109 | |
110 <DT><A name="Deflate_FastBytes"></A>fb={NumFastBytes}</DT> | |
111 <DD> | |
112 <P>Sets the number of fast bytes for the Deflate/Deflate64 encoder. | |
113 It can be in the range from 3 to 258 (257 for Deflate64). | |
114 Usually, a big number gives a little bit better | |
115 compression ratio and a slower compression process. | |
116 A large fast bytes parameter can significantly increase the compression ratio | |
117 for files which contain long identical sequences of bytes.</P> | |
118 </DD> | |
119 <DT><A name="Zip_Pass"></A>pass={NumPasses}</DT> | |
120 <DD> | |
121 <P>Sets number of passes for Deflate encoder. It can be in the range from 1 to 15 for Deflate and | |
122 from 1 to 10 for BZip2. Usually, a big number gives a little bit better | |
123 compression ratio and a slower compression process. | |
124 </P> | |
125 </DD> | |
126 <DT><A name="ZipDictionarySize"></A>d={Size}[b|k|m]</DT> | |
127 <DD> | |
128 <P> Sets the Dictionary size for BZip2. You must specify the size in bytes, kilobytes, or megabytes. | |
129 The maximum value for the Dictionary size is 900000b. If you do not specify any symbol | |
130 from set [b|k|m], dictionary size will be calculated as DictionarySize = 2^Size bytes.</P> | |
131 </DD> | |
132 | |
133 <DT><A name="ZipMemorySize"></A>mem={Size}[b|k|m]</DT> | |
134 <DD> | |
135 <P> Sets the size of memory used for PPMd. You must specify the size in bytes, kilobytes, or megabytes. | |
136 The maximum value is 256 MB = 2^28 bytes. The default value | |
137 is 24 (16MB). If you do not specify any symbol from the set [b|k|m], the | |
138 memory size will be calculated as (2^Size) bytes. PPMd uses the same | |
139 amount of memory for compression and decompression.</P> | |
140 </DD> | |
141 | |
142 <DT><A name="ZipOrder"></A>o={Size}</DT> | |
143 <DD> | |
144 <P>Sets the model order for PPMd. The size must be in the range [2,16]. The default value is 8.</P> | |
145 </DD> | |
146 | |
147 <DT><A name="ZipMultiThread"></A>mt=[off | on | {N}]</DT> | |
148 <DD> | |
149 <P>Sets multithread mode. If you have a multiprocessor or multicore system, | |
150 you can get a speed increase with | |
151 this switch. This option affects only compression (with any method) and | |
152 decompression of BZip2 streams. | |
153 Each thread in the multithread mode uses 32 MB of RAM for buffering. | |
154 If you specify {N}, 7-Zip tries to use N threads.</P> | |
155 </DD> | |
156 </DL> | |
157 | |
158 <H2><A name="GZ"></A>GZip</H2> | |
159 GZip uses the same parameters as Zip, but GZip compresses only with Deflate method. | |
160 So GZip supports only the following parameters: x, fb, pass. | |
161 | |
162 <H2><A name="BZ2"></A>BZip2</H2> | |
163 <TABLE> | |
164 <TR> | |
165 <TH width="160">Parameter</TH> | |
166 <TH align="center">Default</TH> | |
167 <TH>Description</TH> </TR> | |
168 <TR> | |
169 <TD><A class="parameter" href="#BZip2X">x=[1 | 3 | 5 | 7 | 9 ]</A></TD> | |
170 <TD align="center">5</TD> | |
171 <TD>Sets level of compression.</TD> </TR> | |
172 <TR> | |
173 <TD><A class="parameter" href="#BZip2Pass">pass={NumPasses}</A></TD> | |
174 <TD align="center">1</TD> | |
175 <TD>Sets number of Passes for Bzip2 encoder.</TD></TR> | |
176 <TR> | |
177 <TD><A class="parameter" href="#BZip2DictionarySize">d={Size}[b|k|m]</A></TD> | |
178 <TD align="center">900000</TD> | |
179 <TD>Sets Dictionary size for BZip2</TD></TR> | |
180 <TR> | |
181 <TD><A class="parameter" href="#BZip2MultiThread">mt=[off | on | {N}]</A></TD> | |
182 <TD align="center">on</TD> | |
183 <TD>Sets multithreading mode.</TD></TR> | |
184 </TABLE> | |
185 | |
186 <DL> | |
187 <DT><A name="BZip2"></A>x=[1 | 3 | 5 | 7 | 9 ]</DT> | |
188 <DD> | |
189 <P>Sets level of compression</P> | |
190 <TABLE> | |
191 <TR> <TH>Level</TH> <TH>Dictionary</TH> <TH>NumPasses</TH> <TH>Description</TH> </TR> | |
192 <TR> <TD class="cc">1</TD> <TD class="cc">100000</TD> <TD class="cc" rowspan=3>1</TD> <TD>Fastest</TD> </TR> | |
193 <TR> <TD class="cc">3</TD> <TD class="cc">500000</TD> <TD>Fast</TD> </TR> | |
194 <TR> <TD class="cc">5</TD> <TD class="cc" rowspan=3>900000</TD> <TD>Normal</TD> </TR> | |
195 <TR> <TD class="cc">7</TD> <TD align="center">2</TD> <TD>Maximum</TD> </TR> | |
196 <TR> <TD class="cc">9</TD> <TD align="center">7</TD> <TD>Ultra</TD> </TR> | |
197 </TABLE> | |
198 </DD> | |
199 | |
200 <DT><A name="BZip2DictionarySize"></A>d={Size}[b|k|m]</DT> | |
201 <DD> | |
202 <P> Sets the Dictionary size for BZip2. You must specify the size in bytes, kilobytes, or megabytes. | |
203 The maximum value for the Dictionary size is 900000b. If you do not specify any symbol | |
204 from set [b|k|m], dictionary size will be calculated as DictionarySize = 2^Size bytes.</P> | |
205 </DD> | |
206 | |
207 <DT><A name="#BZip2Pass"></A>pass={NumPasses}</DT> | |
208 <DD> | |
209 <P>Sets the number of passes. It can be in the range from 1 to 10. | |
210 The default value is 1 for normal mode, 2 for maximum mode and 7 for ultra mode. | |
211 A bigger number can give a little bit better compression ratio and a slower compression process. | |
212 </P> | |
213 </DD> | |
214 <DT><A name="BZip2MultiThread"></A>mt=[off | on | {N}]</DT> | |
215 <DD> | |
216 <P>Sets multithread mode. If you have a multiprocessor or multicore system, | |
217 you can get a speed increase with | |
218 this switch. If you specify {N}, for example mt=4, 7-Zip tries to use 4 threads.</P> | |
219 </DD> | |
220 </DL> | |
221 | |
222 <H2><A name="7Z"></A>7z</H2> | |
223 <TABLE> | |
224 <TR> <TH width="80">Parameter</TH> <TH align="center">Default</TH> <TH>Description</TH> </TR> | |
225 <TR> <TD><A class="parameter" href="#SevenZipX">x=[0 | 1 | 3 | 5 | 7 | 9 ]</A></TD> | |
226 <TD align="center">5</TD><TD>Sets level of compression.</TD> </TR> | |
227 <TR> <TD><A class="parameter" href="#Solid">s=[off | on | [e] [{N}f] [{N}b | {N}k | {N}m | {N}g]</A></TD> | |
228 <TD align="center">on</TD> <TD>Sets solid mode.</TD> </TR> | |
229 <TR> <TD><A class="parameter" href="#Filter">f=[off | on]</A></TD> | |
230 <TD align="center">on</TD> <TD>Enables or disables compression filters for executable files.</TD> </TR> | |
231 <TR> <TD><A class="parameter" href="#HeaderCompress">hc=[off | on]</A></TD> | |
232 <TD align="center">on</TD> <TD>Enables or disables archive header compressing.</TD> </TR> | |
233 <TR> <TD><A class="parameter" href="#HeaderEncrypt">he=[off | on]</A></TD> | |
234 <TD align="center">off</TD> <TD>Enables or disables archive header encryption.</TD> </TR> | |
235 <TR> <TD><A class="parameter" href="#Bind">b{C1}[s{S1}]:{C2}[s{S2}]</A></TD> | |
236 <TD align="center"> </TD> <TD>Sets binding beetwen coders.</TD> </TR> | |
237 <TR> <TD><A class="parameter" href="#MethodID">{N}={MethodID}[:param1][:param2][..]</A></TD> | |
238 <TD align="center">LZMA</TD> <TD>Sets a method: LZMA, LZMA2, PPMd, BZip2, Deflate, Delta, BCJ, BCJ2, Copy.</TD> </TR> | |
239 <TR> <TD><A class="parameter" href="#MultiThread">mt=[off | on | {N}]</A></TD> | |
240 <TD align="center">on</TD> <TD>Sets multithreading mode.</TD> </TR> | |
241 <TR> <TD><A class="parameter">tc=[off | on]</A></TD> | |
242 <TD align="center">off</TD> <TD>Stores file creation timestamps.</TD> </TR> | |
243 </TABLE> | |
244 | |
245 <DL> | |
246 <DT><A name="SevenZipX"></A>x=[0 | 1 | 3 | 5 | 7 | 9 ]</DT> | |
247 <DD> | |
248 <P>Sets level of compression</P> | |
249 <TABLE> | |
250 <TR> <TH>Level</TH> <TH>Method</TH> <TH>Dictionary</TH> <TH>FastBytes</TH> <TH>MatchFinder</TH> <TH>Filter</TH> <TH>Description</TH> </TR> | |
251 <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> | |
252 <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> | |
253 <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> | |
254 <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> | |
255 <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> | |
256 <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> | |
257 </TABLE> | |
258 <P>Note: "x" works as "x=9".</P> | |
259 </DD> | |
260 | |
261 <DT><A name="Solid"></A>s=[off | on | [e] [{N}f] [{N}b | {N}k | {N}m | {N}g)]</DT> | |
262 <DD> | |
263 <P> Enables or disables solid mode. The default mode is s=on. | |
264 In solid mode, files are grouped together. Usually, compressing in | |
265 solid mode improves the compression ratio.</P> | |
266 | |
267 <TABLE> | |
268 <TR> <TD>e</TD> <TD>Use a separate solid block for each new file extension</TD> </TR> | |
269 <TR> <TD>{N}f</TD> <TD>Set the limit for number of files in one solid block</TD> </TR> | |
270 <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> | |
271 </TABLE> | |
272 | |
273 <P>These are the default limits for the solid block size:</P> | |
274 | |
275 <TABLE> | |
276 <TR> <TH width="150">Compression Level</TH> <TH>Solid block size</TH> </TR> | |
277 <TR> <TD>Store</TD> <TD>0 B</TD> </TR> | |
278 <TR> <TD>Fastest</TD> <TD>16 MB</TD> </TR> | |
279 <TR> <TD>Fast</TD> <TD>128 MB</TD> </TR> | |
280 <TR> <TD>Normal</TD> <TD>2 GB</TD> </TR> | |
281 <TR> <TD>Maximum</TD> <TD>4 GB</TD> </TR> | |
282 <TR> <TD>Ultra</TD> <TD>4 GB</TD> </TR> | |
283 </TABLE> | |
284 | |
285 | |
286 <P>Limitation of the solid block size usually decreases compression ratio but gives the following advantages:</P> | |
287 <UL> | |
288 <LI>Decreases losses in case of future archive damage. | |
289 <LI>Decreases extraction time of a group of files (or just one | |
290 file), so long as the group doesn't contain the entire archive.</LI></LI> | |
291 </UL> | |
292 <P>The updating of solid .7z archives can be slow, since it | |
293 can require some recompression.</P> | |
294 | |
295 <P>Example:</P> | |
296 <PRE class="example"> | |
297 s=100f10m | |
298 </PRE> | |
299 <P>set solid mode with 100 files & 10 MB limits per one solid block.</P> | |
300 | |
301 <DT><A name="Filter"></A>f=[off | on]</DT> | |
302 <DD> | |
303 <P>Enables or disables compression filters for executable files: | |
304 dll, exe, ocx, sfx, sys. It uses BCJ2 filter in Ultra mode and BCJ | |
305 filter in other modes. The default mode is f=on. | |
306 </P> | |
307 <DT><A name="HeaderCompress"></A>hc=[off | on]</DT> | |
308 <DD> | |
309 <P> Enables or disables archive header compressing. The default mode is hc=on. | |
310 If archive header compressing is enabled, some parts of archive header will | |
311 be compressed with LZMA method. | |
312 </P> | |
313 <DT><A name="HeaderEncrypt"></A>he=[off | on]</DT> | |
314 <DD> | |
315 <P> Enables or disables archive header encryption. The default mode is he=off. | |
316 </P> | |
317 <DT>{N}</DT> | |
318 <DD> | |
319 <P>Sets order of methods. It is used also to associate parameters with | |
320 methods. Numbers must begin from 0. Methods that have smaller numbers will be used | |
321 before others.</P> | |
322 </DD> | |
323 | |
324 <DT><A name="Bind"></A>b{C1}[s{S1}]:{C2}[s{S2}]</DT> | |
325 <DD> | |
326 <P> Binds output stream S1 in coder C1 with input stream S2 in coder C2. | |
327 If stream number is not specified, stream with number 0 will be used. | |
328 </P> | |
329 <P> Usally coder has one input stream and | |
330 one output stream. In 7z some coders can have multiple input and output streams.</P> | |
331 | |
332 <P>For example, <A class="parameter" href="#BCJ2">BCJ2</A> encoder has one | |
333 input stream and four output streams.</P> | |
334 </DD> | |
335 | |
336 <DT><A name="MultiThread"></A>mt=[off | on | {N}]</DT> | |
337 <DD> | |
338 <P>Sets multithread mode. If you have a multiprocessor or multicore system, | |
339 you can get a increase with this switch. | |
340 7-Zip supports multithread mode only for LZMA / LZMA2 compression and | |
341 BZip2 compression / decompression. If you specify {N}, for example mt=4, | |
342 7-Zip tries to use 4 threads. LZMA compression uses only 2 threads. | |
343 </P> | |
344 </DD> | |
345 | |
346 <DT><A name="MethodID"></A>{N}={MethodID}[:param1][:param2] ... [:paramN]</DT> | |
347 <DD> | |
348 <P>Sets compression method. You can use any number of methods. | |
349 The default method is LZMA. </P> | |
350 <P>Parameters must be in one of the following forms:</P> | |
351 <UL> | |
352 <LI>{ParamName}={ParamValue}. | |
353 <LI>{ParamName}{ParamValue}, if {ParamValue} | |
354 is number and {ParamName} doesn't contain numbers. | |
355 </UL> | |
356 | |
357 <P>Supported methods:</P> | |
358 <TABLE> | |
359 <TR> <TH width="60">MethodID</TH> <TH>Description</TH> </TR> | |
360 <TR> <TD><A class="parameter" href="#LZMA">LZMA</A></TD> <TD>LZ-based algorithm</TD> </TR> | |
361 <TR> <TD><A class="parameter" href="#LZMA2">LZMA2</A></TD> <TD>LZMA-based algorithm</TD> </TR> | |
362 <TR> <TD><A class="parameter" href="#PPMd">PPMd</A></TD> <TD>Dmitry Shkarin's PPMdH with small changes</TD> </TR> | |
363 <TR> <TD>BZip2</TD> <TD>BWT algorithm</TD> </TR> | |
364 <TR> <TD>Deflate</TD> <TD>LZ+Huffman</TD> </TR> | |
365 <TR> <TD>Copy</TD> <TD>No compression</TD> </TR> | |
366 </TABLE> | |
367 | |
368 <P>Supported filters:</P> | |
369 <TABLE> | |
370 <TR> <TH width="60">MethodID</TH> <TH>Description</TH> </TR> | |
371 <TR> <TD><A class="parameter" href="#Delta">Delta</A></TD> <TD>Delta filter</TD> </TR> | |
372 <TR> <TD>BCJ</TD> <TD>converter for x86 executables</TD> </TR> | |
373 <TR> <TD><A class="parameter" href="#BCJ2">BCJ2</A></TD> <TD>converter for x86 executables (version 2)</TD> </TR> | |
374 <TR> <TD>ARM</TD> <TD>converter for ARM (little endian) executables</TD> </TR> | |
375 <TR> <TD>ARMT</TD> <TD>converter for ARM Thumb (little endian) executables</TD> </TR> | |
376 <TR> <TD>IA64</TD> <TD>converter for IA-64 executables</TD> </TR> | |
377 <TR> <TD>PPC</TD> <TD>converter for PowerPC (big endian) executables</TD> </TR> | |
378 <TR> <TD>SPARC</TD> <TD>converter for SPARC executables</TD> </TR> | |
379 </TABLE> | |
380 <P>Filters increase the compression ratio for some types of files. Filters | |
381 must be used with one of the compression method (for example, BCJ + LZMA).</P> | |
382 </DD> | |
383 | |
384 <H4><A name="LZMA"></A>LZMA</H4> | |
385 <P> LZMA is an algorithm based on Lempel-Ziv algorithm. | |
386 It provides very fast decompression (about 10-20 times faster than compression). | |
387 Memory requirements for compression and decompression also are different (see | |
388 <A class="parameter" href="#DictionarySize">d={Size}[b|k|m]</A> switch for details).</P> | |
389 | |
390 <TABLE> | |
391 <TR> <TH width="80">Parameter</TH> <TH align="center">Default</TH> <TH>Description</TH> </TR> | |
392 | |
393 <TR> <TD><A class="parameter" href="#LZMAMode">a=[0|1]</A></TD> | |
394 <TD align="center">1</TD> <TD>Sets compressing mode</TD> </TR> | |
395 <TR> <TD><A class="parameter" href="#DictionarySize">d={Size}[b|k|m]</A></TD> | |
396 <TD align="center">24</TD> <TD>Sets Dictionary size</TD> </TR> | |
397 <TR> <TD><A class="parameter" href="#MatchFinder">mf={MF_ID}</A></TD> | |
398 <TD align="center">bt4</TD> <TD>Sets Match Finder</TD> </TR> | |
399 <TR> <TD><A class="parameter" href="#FastBytes">fb={N}</A></TD> | |
400 <TD align="center">32</TD> <TD>Sets number of Fast Bytes</TD></TR> | |
401 <TR> <TD><A class="parameter" href="#MatchFinderCycles">mc={N}</A></TD> | |
402 <TD align="center">32</TD><TD>Sets Number of Cycles for Match Finder</TD> </TR> | |
403 <TR> <TD><A class="parameter" href="#LitContext">lc={N}</A></TD> | |
404 <TD align="center">3</TD> <TD>Sets number of Literal Context bits - [0, 8]</TD></TR> | |
405 <TR> <TD><A class="parameter" href="#LitPos">lp={N}</A></TD> | |
406 <TD align="center">0</TD> <TD>Sets number of Literal Pos bits - [0, 4]</TD></TR> | |
407 <TR> <TD><A class="parameter" href="#PosBits">pb={N}</A></TD> | |
408 <TD align="center">2</TD> <TD>Set number of Pos Bits - [0, 4]</TD></TR> | |
409 </TABLE> | |
410 | |
411 | |
412 <DL> | |
413 <DT><A name="#LZMAMode"></A>a=[0|1]</DT> | |
414 <DD> | |
415 <P> Sets compression mode: 0 = fast, 1 = normal. | |
416 Default value is 1.</P> | |
417 </DD> | |
418 <DT><A name="DictionarySize"></A>d={Size}[b|k|m]</DT> | |
419 <DD> | |
420 <P> Sets Dictionary size for LZMA. You must specify the size in bytes, kilobytes, or megabytes. | |
421 The maximum value for dictionary size is 1 GB = 2^30 bytes. Default values for LZMA | |
422 are 24 (16 MB) in normal mode, 25 (32 MB) in maximum mode (-mx=7) | |
423 and 26 (64 MB) in ultra mode (-mx=9). | |
424 If you do not specify any symbol from the set [b|k|m], the | |
425 dictionary size will be calculated as DictionarySize = 2^Size bytes. | |
426 For decompressing a file compressed by LZMA method with dictionary size N, you need | |
427 about N bytes of memory (RAM) available. | |
428 </P> | |
429 </DD> | |
430 <DT><A name="MatchFinder"></A>mf={MF_ID}</DT> | |
431 <DD> | |
432 <P> Sets Match Finder for LZMA. Default method is bt4. | |
433 Algorithms from hc* group don't provide a good compression ratio, | |
434 but they often work pretty fast in combination with fast mode (a=0). | |
435 Memory requirements depend on dictionary size (parameter "d" in table below). | |
436 </P> | |
437 <TABLE> | |
438 <TR> <TH>MF_ID</TH> <TH class="cc">Dictionary</TH> <TH class="cc" colspan = 2>Memory Usage</TH> <TH class="cc" colspan = 2>Description</TH> </TR> | |
439 <TR> <TD class="cc">bt2</TD> <TD></TD> <TD align="right"> 9.5 * d</TD> <TD class="cc" rowspan=6> + 4 MB</TD> <TD class="cc" rowspan=4>Binary Tree</TD> <TD>2 bytes hashing</TD> </TR> | |
440 <TR> <TD class="cc">bt3</TD> <TD></TD> <TD align="right">11.5 * d</TD> <TD>3 bytes hashing</TD> </TR> | |
441 <TR> <TD class="cc" rowspan=2>bt4</TD> <TD class="cc">64 KB ... 48 MB</TD> <TD align="right">11.5 * d</TD> <TD class="cc" rowspan=6>4 bytes hashing</TD> </TR> | |
442 <TR> <TD class="cc">64 MB ... 1024 MB</TD> <TD align="right">10.5 * d</TD> </TR> | |
443 <TR> <TD class="cc" rowspan=2>hc4</TD> <TD class="cc">64 KB ... 48 MB</TD> <TD align="right"> 7.5 * d</TD> <TD class="cc" rowspan=2>Hash Chain </TD></TR> | |
444 <TR> <TD class="cc">64 MB ... 1024 MB</TD> <TD align="right"> 6.5 * d</TD> </TR> | |
445 </TABLE> | |
446 <P>Note: Your operation system also needs some amount of physical memory for internal purposes. | |
447 So keep at least 32MB of physical memory unused.</P> | |
448 </DD> | |
449 | |
450 <DT><A name="FastBytes"></A>fb={N}</DT> | |
451 <DD> | |
452 <P>Sets number of fast bytes for LZMA. It can be in the range from 5 to 273. | |
453 The default value is 32 for normal mode and 64 for maximum and ultra modes. | |
454 Usually, a big number gives a little bit better | |
455 compression ratio and slower compression process. | |
456 </P> | |
457 </DD> | |
458 <DT><A name="MatchFinderCycles"></A>mc={N}</DT> | |
459 <DD> | |
460 <P>Sets number of cycles (passes) for match finder. It can be in range from 0 to 1000000000. | |
461 Default value is (16 + number_of_fast_bytes / 2) for BT* match finders and | |
462 (8 + number_of_fast_bytes / 4) for HC4 match finder. | |
463 If you specify mc=0, LZMA will use default value. | |
464 Usually, a big number gives a little bit better compression ratio and slower | |
465 compression process. For example, mf=HC4 and mc=10000 can provide almost the same | |
466 compression ratio as mf=BT4.</P> | |
467 </DD> | |
468 <DT><A name="LitContext"></A>lc={N}</DT> | |
469 <DD> | |
470 <P>Sets the number of literal context bits (high bits of previous literal). | |
471 It can be in range from 0 to 8. | |
472 Default value is 3. Sometimes lc=4 gives gain for big files.</P> | |
473 </DD> | |
474 <DT><A name="LitPos"></A>lp={N}</DT> | |
475 <DD> | |
476 <P>Sets the number of literal pos bits (low bits of current position for literals). | |
477 It can be in the range from 0 to 4. | |
478 The default value is 0. The lp switch is intended for periodical data when the | |
479 period is equal to 2^value (where lp=value). For example, for 32-bit (4 bytes) | |
480 periodical data you can use lp=2. Often it's better to set lc=0, | |
481 if you change lp switch.</P> | |
482 </DD> | |
483 <DT><A name="PosBits"></A>pb={N}</DT> | |
484 <DD> | |
485 <P>Sets the number of pos bits (low bits of current position). | |
486 It can be in the range from 0 to 4. | |
487 The default value is 2. The pb switch is intended for periodical data when the | |
488 period is equal 2^value (where lp=value). </P> | |
489 </DD> | |
490 | |
491 </DL> | |
492 | |
493 <H4><A name="LZMA2"></A>LZMA2</H4> | |
494 <P>LZMA2 is modified version of LZMA. it provides the following advantages over LZMA:</P> | |
495 <UL> | |
496 <LI>Better compression ratio for data than can't be compressed. LZMA2 can store such | |
497 blocks of data in uncompressed form. Also it decompresses such data faster. | |
498 <LI>Better multithreading support. If you compress big file, LZMA2 can split | |
499 that file to chunks and compress these chunks in multiple threads. | |
500 </UL> | |
501 | |
502 <TABLE> | |
503 <TR> <TH width="80">Parameter</TH> <TH align="center">Default</TH> <TH>Description</TH> </TR> | |
504 | |
505 <TR> <TD><A class="parameter" href="#ChunkSize">c={Size}[b|k|m]</A></TD> | |
506 <TD align="center">dictSize * 4</TD> <TD>Sets Chunk size</TD> </TR> | |
507 </TABLE> | |
508 | |
509 <P>If you don't specify ChunkSize, LZMA2 sets it to DictionarySize * 4.</P> | |
510 | |
511 <P>LZMA2 also supports all LZMA parameters, but lp+lc cannot be larger than 4.</P> | |
512 | |
513 <P>LZMA2 uses: 1 thread for each chunk in x1 and x3 modes; and | |
514 2 threads for each chunk in x5, x7 and x9 modes. | |
515 If LZMA2 is set to use only such number of threads required for one chunk, | |
516 it doesn't split stream to chunks. So you can get different compression | |
517 ratio for different number of threads. You can get the best compression | |
518 ratio, when you use 1 or 2 threads.</P> | |
519 | |
520 <H4><A name="PPMd"></A>PPMd</H4> | |
521 <P> PPMd is a PPM-based algorithm. This algorithm is mostly based | |
522 on Dmitry Shkarin's PPMdH source code. PPMd provides very good compression ratio for | |
523 plain text files. There is no difference between compression speed and | |
524 decompression speed. Memory requirements for compression and decompression | |
525 also are the same.</P> | |
526 <TABLE> | |
527 <TR> <TH width="80">Parameter</TH> <TH align="center">Default</TH> <TH>Description</TH> </TR> | |
528 <TR> <TD><A class="parameter" href="#MemorySize">mem={Size}[b|k|m]</A></TD> | |
529 <TD align="center">24</TD> <TD>Sets size of used memory for PPMd.</TD> </TR> | |
530 <TR> <TD><A class="parameter" href="#Order">o={Size}</A></TD> | |
531 <TD align="center">6</TD> <TD>Sets model order for PPMd.</TD> </TR> | |
532 </TABLE> | |
533 <DL> | |
534 <DT><A name="MemorySize"></A>mem={Size}[b|k|m]</DT> | |
535 <DD> | |
536 <P> Sets the size of memory used for PPMd. You must specify the size in bytes, kilobytes, or megabytes. | |
537 The maximum value is 2GB = 2^31 bytes. The default value | |
538 is 24 (16MB). If you do not specify any symbol from the set [b|k|m], the | |
539 memory size will be calculated as (2^Size) bytes. PPMd uses the same | |
540 amount of memory for compression and decompression.</P> | |
541 </DD> | |
542 | |
543 <DT><A name="Order"></A>o={Size}</DT> | |
544 <DD> | |
545 <P>Sets the model order for PPMd. The size must be in the range [2,32]. The default value is 6.</P> | |
546 </DD> | |
547 </DL> | |
548 | |
549 <H4><A name="BCJ2"></A>BCJ2</H4> | |
550 <P>BCJ2 is a Branch converter for 32-bit x86 executables (version 2). | |
551 It converts some branch instructions for increasing further compression.</P> | |
552 <P>A BCJ2 encoder has one input stream and four output streams:</P> | |
553 <UL> | |
554 <LI>s0: main stream. It requires further compression.</LI> | |
555 <LI>s1: stream for converted CALL values. It requires further compression.</LI> | |
556 <LI>s2: stream for converted JUMP values. It requires further compression.</LI> | |
557 <LI>s3: service stream. It is already compressed.</LI> | |
558 </UL> | |
559 <P>If LZMA is used, the size of the dictionary for streams | |
560 s1 and s2 can be much smaller (512 KB is enough for most cases) | |
561 than the dictionary size for stream s0.</P> | |
562 | |
563 <H4><A name="Delta"></A>Delta</H4> | |
564 <P>It's possible to set delta offset in bytes. For example, to compress 16-bit stereo | |
565 WAV files, you can set "0=Delta:4". Default delta offset is 1.</P> | |
566 </DL> | |
567 | |
568 <H2><A name="XZ"></A>XZ</H2> | |
569 XZ supports only LZMA2 codec now. The switches are similar to switches for 7z format. | |
570 | |
571 <H4>Examples</H4> | |
572 | |
573 <PRE class="example"> | |
574 7z a -tzip archive.zip *.jpg -mx0 | |
575 </PRE> | |
576 | |
577 <P>adds <SPAN class="filename">*.jpg</SPAN> files to | |
578 <SPAN class="filename">archive.zip</SPAN> archive without compression.</P> | |
579 | |
580 <PRE class="example"> | |
581 7z a -t7z archive.7z *.exe *.dll -m0=BCJ -m1=LZMA:d=21 -ms -mmt | |
582 </PRE> | |
583 | |
584 <P>adds <SPAN class="filename">*.exe</SPAN> and <SPAN class="filename">*.dll</SPAN> | |
585 files to solid archive <SPAN class="filename">archive.7z</SPAN> using LZMA method with | |
586 2 MB dictionary and BCJ converter. Compression will use multithreading optimization.</P> | |
587 | |
588 <PRE class="example"> | |
589 7z a -t7z archive.7z *.exe *.dll -m0=BCJ2 -m1=LZMA:d23 -m2=LZMA:d19 -m3=LZMA:d19 | |
590 -mb0:1 -mb0s1:2 -mb0s2:3 | |
591 </PRE> | |
592 | |
593 <P>adds <SPAN class="filename">*.exe</SPAN> and <SPAN class="filename">*.dll</SPAN> | |
594 files to archive <SPAN class="filename">archive.7z</SPAN> using BCJ2 converter, | |
595 LZMA with 8 MB dictionary for main output stream (s0), | |
596 and LZMA with 512 KB dictionary for s1 and s2 output streams of BCJ2.</P> | |
597 | |
598 | |
599 <PRE class="example"> | |
600 7z a -t7z archive.7z *.txt -m0=PPMd | |
601 </PRE> | |
602 | |
603 <P>adds <SPAN class="filename">*.txt</SPAN> files to archive | |
604 <SPAN class="filename">archive.7z</SPAN> using PPMd method.</P> | |
605 | |
606 | |
607 | |
608 | |
609 <H4>Commands that can be used with this switch</H4> | |
610 | |
611 <P> | |
612 <A href="../commands/add.htm">a (Add)</A>, | |
613 <A href="../commands/delete.htm">d (Delete)</A>, | |
614 <A href="../commands/update.htm">u (Update)</A>, | |
615 </P> | |
616 | |
617 <H4>See also</H4> | |
618 | |
619 <P> | |
620 <B>Switches:</B> | |
621 <A href="type.htm">-t (set Type of archive)</A>, | |
622 </P> | |
623 | |
624 </BODY> | |
625 </HTML> |