7zip equivalent to "zip -9" for maximum compression?

5

2

Please forgive my ignorance here. I've read the 7zip man page, and its not clear to me how to achieve the equivalent to zip -9 .... I think the man page of interest is -m (Set compression Method) switch.

What is the 7zip equivalent to zip -9 ... for maximum compression?


In the larger picture, here is how it is being used on Windows. On Unix, Linux and OS X we use the zip command:

 7z.exe a -r -tzip cryptopp.zip cov-int

jww

Posted 2016-10-01T06:08:07.020

Reputation: 1

According to that man page it would probably be something like 7z a cryptopp.7z -r -mx=9 cov-int/* – Seth – 2016-10-01T07:11:13.330

Answers

8

Use -mx=9 switch.

As you can see on the manual page you linked, 7z offers you several methods of compression: Copy, Deflate, Deflate64, BZip2, LZMA, PPMd

In paragraph related to each method, you can see whether x parameter (setting of compression level) is supported for that method and what levels are valid. You can see that value 9 is generally valid with all methods which support setting of compression level and it represents maximum compression.

So the example is (derived from the manual page):

7z a archive.zip *.jpg -mx9

(It is a bit strange that they write -mx9 without = in the example. If this does not work, just use -mx=9.)

miroxlav

Posted 2016-10-01T06:08:07.020

Reputation: 9 376