Ubuntu – 7z “ultra” settings for zip format

7zipcompressionsettingszip

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)?

Best Answer

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.

Zip

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

fb={NumFastBytes}

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.

pass={NumPasses}

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.

d={Size}[b|k|m]

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.

mem={Size}[b|k|m]

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.

o={Size}

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.

Related Question