Customize Gnome Archive Manager 7z commands
Archive manager + nautilus is very usefull thing for any work with archives
If you install p7zip-full package Archive manager can work with 7z archives
But Archive manager use default settings for compressing
It is very bad
Classical example with javadoc:
Download it from http://www.oracle.com/technetwork/java/javase/downloads/index.html
unzip jdk-6u23-docs.zip
mv docs javadoc
7z开发者_开发技巧 a -t7z -m0=lzma -ms=on javadoc.7z javadoc
du -chb javadoc.7z
24791075 javadoc.7z
But from man 7z and from LzmaLib.h we know that best compression is -mx=9 -mfb=273 -md=64m
Let's try:
7z a -t7z -m0=lzma -mx=9 -mfb=273 -md=64m -ms=on javadoc.7z javadoc
du -chb javadoc.7z
21308619 javadoc.7z
This is real better!
Question: How to make Archive manager to use custom 7z command as default?
You'll get a faster answer at superuser, for questions like this one.
Looking at the program, I discovered that it was File-Roller and the compression parameters were in an XML file. The manual mentioned nothing about configuration for the compression level. Finally, I found this information with Google(at bottom of page):
Veikk0 wrote on the 24 Jul 10 at 20:17
In my opinion this should get more attention. Creating archives can be frustrating and difficult at the moment, mostly because to change the compression level you have to:
Open gconf-editor (alt+F2 or from terminal).
Navigate to /apps/file-roller/general
Manually edit the key called compression_level to very_fast, fast, normal or maximum.
Create your archive with file-roller.
Repeat if you want to create another archive with different compression level.
Furthermore, there's a bug for this: Bug 450019 - compression level
On Trisquel 6.0/Ubuntu 12.04, it's dconf-editor
, and the schema is org.gnome.FileRoller.General
.
The best compression with 7-zip can be achieved with
7zr a -mx=9 OUTPUT.7z INPUT
which produces slightly smaller files than the "maximum" compression level of File Roller, due to the fact, that File Roller uses the -m0=lzma2
parameter, which is no longer beneficial as of 7-zip version 9.20.
精彩评论