When we want to compress something we pack it in .tar, .gz, . Bz2 or some combination of these, at least that I have been able to appreciate in most cases. Compress in .zip is something that belongs to the pastI could even include here .ace), while compressing in .rar it is not exactly to our liking, well because .rar It is a non-free format, or any other reason 🙂
The point is that it exists . 7z (7zip) that compresses much more than the aforementioned. When I wanted to compress something to the maximum with 7zip I had to write a command for it, but not anymore, because I made this option in the services menu (right click options) of KDE:
1. To add this option to our system we must first download the file .desktop:
2. We must keep it in $ HOME / .kde / share / kde4 / services / so that it is enabled for our user, or save it in / usr / share / kde4 / services / so that it is enabled for all users of the system. In case the folder $ HOME / .kde / share / kde4 / o $ HOME / .kde / share / kde4 / services / it does not matter, you create the missing folder 😉
3. They must have the package installed p7zip-full y p7zip
4. Close Dolphin (file manager) and reopen it, this option should already appear.
When using this option, what is executed in the background is the following:
7za a -t7z -m0=lzma -mx=9 -ms=on %u.7z %f
- 7za to : To add files
- -t7z : Specifies that the output file will be .7z
- -m0 = lzma : Compression parameters, you can read about it here
- -mx-9 : We specify that we want to compress to the maximum
- -ms = on : Solid file
- % u.7z : Output file, the %u means the path of the file that we want to compress, followed by . 7z We indicate the final compressed file will be created right there where the original is
- %f : This will be the file or folder that we want to compress
- So much % u.7z as %f they are KDE's own parameters, that is, they are not related to Bash or 7za.
To give you an idea of how much 7zip compresses, a dump of the DesdeLinux (.sql) weighed 715MB a few weeks ago, compressed with 7zip it is only 96MB 😀
Anyway ... I no longer have to be typing a command to compress to the maximum with 7zip, now I can do it from the options menu in Dolphin 😉
I hope this has served you, greetings (I.e.
Well, two things I have to say ..
1 ° If I put it in the home folder within the corresponding folder, the item does not appear in the menu, but it does appear if I put it in / usr / share / kde4 / services / ..
2 ° It is not so much what compresses, unless it did not serve me that way.
About the level of compression, it depends a lot on what you want to compress. For example, if you are going to compress photos or videos ... obviously it will not compress more than a few mb, the multimedia content to compress it must be lowered the quality, that simple.
Try compressing large text files and you will see 😉
Thanks, it works great.
A pleasure 🙂
regards
Ehm ... You don't have to do that to be able to compress in 7zip without using a console. In Dolphin:
Right click / Compress / Compress in ...
There the window opens for you to choose where to compress, the name of the file ... And the type, including 7zip.
Obviously you have to have p7zip-full installed.
Yes indeed, I did not know this option 😀
But does it fully compress as if it had -mx = 9?
Well, I don't know that. You can do the compression test with both methods and you can tell us.
LOL
Boys, I have done the test several times, with different types of files, pdf, ppt, doc …… .. Look at the compression level is almost the same, -mx = 9 it seems always has a KB advantage… 🙂
Thanks for the info!
With so little difference I think it is not worth using a console or adding the service, really. I at least stick with the option that Dolphin brings by default.
If I want it to appear instead of actions in the compress menu, how do I do it ??? Should I change this [Desktop Action 7zipc] ??? And why do I get two options in the actions menu, one at the beginning and one at the end?
PS .: This great thank you very much hehehej
Let do some tests to see how it can be put in the same section 😉
Thank you for comment.
KZKG ^ Gaara I think I compressed the dump in that way by the compression theory, if you can do the test with different files, videos, images, documents, to see if it gives a similar result. Anyway, my jaw dropped with the result. Thank you. regards
videos and images are almost always compressed files, there won't be much difference.
If you want to compress the images more it would be to use WebP and for the videos WebM or something similar / equivalent.
Ta weno, it works by the kilo and it's cool as seen in the menu ...
Good tip
Brilliant!
Thanks man!
Regards!
By the way, looking at the amount of compression, it can be said that the compression ratio is quite wide because you compressed a fairly high amount in MB in only 90x MB.
Interesting
Thank you
Hello excuse me, how could I make it remind me of the directory? for example, service menu that renames a file and its extension to another in the same directory
There are programs for this, KRenamer is one of them, PyRenamer another 😉
I had already seen this and I started it a few days ago while compressing some university files .. It really is very good. For example, I compressed a 101 Mb packet to only 36. It's great!
I am looking at the possibility of integrating a progress bar. Do you have any idea?!
With KDialog you could do something about it ... mmm ... let me see if these days I sit down and think about how to achieve a progress bar or at least a notification 🙂
Good article, very useful by the way.
Thanks to you for commenting 🙂
When you want to compress a folder / directory, how is it done?
Very good information, it would be good if you put how to decompress, to have all the information on one side. Thanks greetings.
Complicated for me. There should be an easier way to install this program.