7z "ultra" settings for .7z format are:

7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on

What are the "ultra" settings for .zip format (using 7z)?

1 Answer 1


The defaults for the GUI application file-roller can also be changed:

Be aware that "ultra" may not be very efficient and will just take longer to compress while producing no significant difference in resulting file size than the default settings and may also introduce incompatibilities with other programs.

It should be:

7z a -tzip -mx=9

According to: file:///usr/share/doc/p7zip-full/DOCS/MANUAL/switches/method.htm

This is a link to your filesystem, just put it in the address bar of your webbrowser.

If you are currently not on a computer where the package is installed you could download the DEB package and browse it with another archiver. If my memory serves me correctly, almost the same file should be included in the Windows installer.


Parameter                     Default     Description
x=[0 | 1 | 3 | 5 | 7 | 9 ]    5           Sets level of compression.
m={MethodID}                  Deflate     Sets a method: Copy, Deflate, Deflate64, BZip2, LZMA, PPMd.
fb={NumFastBytes}             32          Sets number of Fast Bytes for Deflate encoder.
pass={NumPasses}              1           Sets number of Passes for Deflate encoder.
d={Size}[b|k|m]               900000      Sets Dictionary size for BZip2
mem={Size}[b|k|m]             24          Sets size of used memory for PPMd.
o={Size}                      8           Sets model order for PPMd.
mt=[off | on | {N}]           on          Sets multithreading mode.
em={EncryptionMethodID}       ZipCrypto   Sets a encryption method: ZipCrypto, AES128, AES192, AES256
tc=[off | on]                 off         Stores NTFS timestamps for files: Modification time, Creation time, Last access time.
cl=[off | on]                 off         7-Zip always uses local code page for file names.
cu=[off | on]                 off         7-Zip uses UTF-8 for file names that contain non-ASCII symbols.

By default (if cl and cu switches are not specified), 7-Zip uses UTF-8 encoding only for file names that contain symbols unsupported by local code page.

x=[0 | 1 | 3 | 5 | 7 | 9 ]

Sets level of compression. x=0 means Copy mode (no compression).

Deflate / Deflate64 settings:

Level NumFastBytes    NumPasses   Description
1     32              1           Fastest
3                                 Fast
5                                 Normal
7     64              3           Maximum
9     128             10          Ultra

x=1 and x=3 with Deflate method set fast mode for compression.

BZip2 settings:

Level Dictionary  NumPasses   Description
1     100000      1           Fastest
3     500000                  Fast
5     900000                  Normal
7                 2           Maximum
9                 7           Ultra


Sets the number of fast bytes for the Deflate/Deflate64 encoder. It can be in the range from 3 to 258 (257 for Deflate64). Usually, a big number gives a little bit better compression ratio and a slower compression process. A large fast bytes parameter can significantly increase the compression ratio for files which contain long identical sequences of bytes.


Sets number of passes for Deflate encoder. It can be in the range from 1 to 15 for Deflate and from 1 to 10 for BZip2. Usually, a big number gives a little bit better compression ratio and a slower compression process.


Sets the Dictionary size for BZip2. You must specify the size in bytes, kilobytes, or megabytes. The maximum value for the Dictionary size is 900000b. If you do not specify any symbol from set [b|k|m], dictionary size will be calculated as DictionarySize = 2^Size bytes.


Sets the size of memory used for PPMd. You must specify the size in bytes, kilobytes, or megabytes. The maximum value is 256 MB = 2^28 bytes. The default value is 24 (16MB). If you do not specify any symbol from the set [b|k|m], the memory size will be calculated as (2^Size) bytes. PPMd uses the same amount of memory for compression and decompression.


Sets the model order for PPMd. The size must be in the range [2,16]. The default value is 8.

mt=[off | on | {N}]

Sets multithread mode. If you have a multiprocessor or multicore system, you can get a speed increase with this switch. This option affects only compression (with any method) and decompression of BZip2 streams. Each thread in the multithread mode uses 32 MB of RAM for buffering. If you specify {N}, 7-Zip tries to use N threads.

  • It returns System error: E_INVALIDARG. If I remove m0=Deflate it works: 7z a -tzip -mx=9 -mfb=128 -mpass=10. Why have you choose -mfb=128 and -mpass=10? Thank you.
    – ᴜsᴇʀ
    Jul 3, 2014 at 16:16
  • @user You asked for ultra settings and according to the table these are the ultra settings for deflate, the standard compression in zip. You should look at the orignal file, the formatting here is limited and can't handle tables as far as I know.
    – LiveWireBT
    Jul 3, 2014 at 16:24
  • I have not explained well. [1] With the option m0=Deflate it doesn't work, and it return System error: E_INVALIDARG. If I remove this option (i.e. 7z a -tzip -mx=9 -mfb=128 -mpass=10 it works) [2] For the second question ("why have you choose -mfb=128 and -mpass=10") now I understand, I looked at the tables.
    – ᴜsᴇʀ
    Jul 3, 2014 at 16:57
  • 1
    @user -mx=9 is equivalent to -mfb=128 -mpass=10, I figured that out after re-reading my post. I don't know why m0=Deflate doesn't work. I think I encountered this issue years ago on Windows and never solved it. It could be a documentation mistake or simply outdated meaning that -tzip only supports one method for compatiblities sake. I don't know, one could file a bug or read the source code to find out what options are actually supported.
    – LiveWireBT
    Jul 4, 2014 at 15:52
  • 1
    I think the reason your m0=Deflate option did not work is because you have the syntax incorrect. I think it should be -mm=Deflate, not -m0=Deflate. That is the syntax on Windows in any case, and the syntax according to what LiveWireBT has posted above. (Thanks for this LiveWireBt, btw). Mar 16, 2017 at 17:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .