LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   regarding 7zip and archivers in general (https://www.linuxquestions.org/questions/programming-9/regarding-7zip-and-archivers-in-general-858709/)

qrange 01-26-2011 02:57 AM

regarding 7zip and archivers in general
 
Its much better to use the good archiver such as rar, 7zip on uncompressed files (and not after crappy zip for eg. ).

People often compress .iso files and similar that contain .cab archives.

So, compression ratio would be much better if those .cab files were first uncompressed and then rar-ed/7zip-ed.

I know it would be difficult, and dearchiver would need to re-compress to make .cab again (so it would have to include M$ algorithm and unpacking would take a lot of time) but its possible?

cantab 01-26-2011 08:22 PM

Sure, it's POSSIBLE. You'd have to extract the iso, scan the file structure for archives, decompress said archives while storing their original name and location, then compress the whole file structure. Then the dearchiver has to decompress the file structure, restore the original archives, and then make the iso - remembering to make it bootable if applicable.

It's a convoluted process, and will require temporary disk space equal to the size of the iso. You mentioned it could take a long time. If the iso contains a decompression bomb, the user of your program is exposed to it. And there's a good chance the dearchived iso will not be bit-for-bit identical to the original.

I really don't think the few percent file savings are likely to be worth it.

qrange 01-28-2011 05:55 AM

I did a test with 300Mb archive and the difference is almost 9%. That is not negligible for modern archivers.

It would be nice to have it as option, just like solid packing.

qrange 01-30-2011 03:40 PM

of course someone else has already done it.. PerfectCompress has "file precompression" option that does just that.


All times are GMT -5. The time now is 07:36 PM.