GNOME Bugzilla – Bug 635083
Support 7z lzma2
Last modified: 2010-11-18 11:53:41 UTC
Created attachment 174690 [details] fr-command-7z.c before and after Hello i'm french, sorry for my english. File-Roller does not support lzma2 for 7z compression. original code fr-command-7z.c line 355 : case FR_COMPRESSION_MAXIMUM: fr_process_add_arg (comm->process, "-mx=7"); break } I propose this fix for the support of real max compression (mx=9) and lzma2 (m0=lzma2) : case FR_COMPRESSION_MAXIMUM: fr_process_add_arg (comm->process, "-mx=9"); fr_process_add_arg (comm->process, "-m0=lzma2"); break; } And do not forget for the user to switch manually with gconf-editor : /apps/file-roller/general/compression_level << maximum (defaut normal) Thanks, bye.
Hi Tetsumaki. Two suggestions ;) a) Providing the modified file is more than fine but it'd be even easier for the developers and maintainers if you provided a diff file instead. You can read more here: http://live.gnome.org/Git/Developers#Contributing_patches. b) Make sure you apply the changes to the latest Git version. You have also modified other unrelated lines. Apart from that, this report looks logical to me.
And thanks, I'm sure file-roller maintainers/developers will appreciate it :D
I changed the compression levels options this way: normal compression : from "-mx=5" to "-mx=7" maximum compression: from "-mx=7" to "-mx=9 -m0=lzma2" Thanks for the suggestion.
Thanks, sorry but i do not use GIT. I propose this modification for full suport LZMA2 and real support max compression. Before : /* fr_process_add_arg (comm->process, "-ms=off"); FIXME: solid mode off? */ switch (comm->compression) { case FR_COMPRESSION_VERY_FAST: fr_process_add_arg (comm->process, "-mx=1"); break; case FR_COMPRESSION_FAST: fr_process_add_arg (comm->process, "-mx=5"); break; case FR_COMPRESSION_NORMAL: fr_process_add_arg (comm->process, "-mx=5"); break; case FR_COMPRESSION_MAXIMUM: fr_process_add_arg (comm->process, "-mx=7"); break; } [b]After :[/b] /* fr_process_add_arg (comm->process, "-ms=off"); FIXME: solid mode off? */ ++ fr_process_add_arg (comm->process, "-m0=lzma2"); switch (comm->compression) { case FR_COMPRESSION_VERY_FAST: fr_process_add_arg (comm->process, "-mx=1"); break; case FR_COMPRESSION_FAST: -- fr_process_add_arg (comm->process, "-mx=5"); break; ++ fr_process_add_arg (comm->process, "-mx=3"); break; case FR_COMPRESSION_NORMAL: fr_process_add_arg (comm->process, "-mx=5"); break; case FR_COMPRESSION_MAXIMUM: -- fr_process_add_arg (comm->process, "-mx=7"); break; ++ fr_process_add_arg (comm->process, "-mx=9"); break; }