Updated: September 4, 2024
How many zips could a file manager zip if a file manager could zip some zips? All right, here's a possibly pointless scenario for you. Say you have a compressed archive of some kind (zip, 7z, tar, rar, whatever), and you want to create a new archive, using the existing one as a source. For instance, you have a file called dedo.zip and you wish to "compress" it further into dedo2.7z.
If you ask around, you will realize that multi-level compression doesn't necessarily have any benefits. Depending on the scenario, the file format, and the compression algorithm, your second-level archive may in fact be larger than the source, and if you also use encryption, in some scenarios, you might even degrade the security this way. But I'm not here to change the world, I'm here to solve a simple issue. Plasma's file manager, Dolphin, does not seem to be able to create multi-level archives. If you select a compressed file, right click, there won't be an option to compress, only extract. All right, so how do you work around that, then? Today's article shall reveal.
Problem in more detail
Well, there's isn't much more to say really:
Solution (or rather, a workaround)
The way around this problem is to create an empty text file, in the same folder where your archive resides, and then, compress the two together. This is not ideal, but the actual data cost is minimal. You add a zero-size file to your new archive (well, a single 4KB page), but most importantly, you can now create new archives, from archives. Inception, FTW.
In general, Dolphin's compression abilities can be slightly improved. It does not remember previous settings, so you need to reapply options again and again, like the use of a specific container format, algorithm, compression level, and such. Furthermore, both the compression and the decompression are somewhat slower than they should be (using some rough, rudimentary benchmarks). Not bad, all considering, but can be a bit better.
Conclusion
If you think about it, Dolphin is pretty amazing. The file manager is pretty, slick, it comes with tons of extras and options, and so, it can do a great deal, often way more than other (rival) Linux file managers. It also handles compression natively, in a variety of formats. There are a few snags, as I've outlined above.
Should you ever desire to compress already compressed files - for whatever reason, including being able to send files over the email (as some mail clients block 7z, for instance), then, having the option to quickly package an archive within another archive is a good thing. I think Dolphin can easily be modified to always include the compress function. That's all really. Anyway, we're done. Take care.
Cheers.