After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 635083 - Support 7z lzma2
Support 7z lzma2
Status: RESOLVED FIXED
Product: file-roller
Classification: Applications
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: Paolo Bacchilega
file-roller-maint
Depends on:
Blocks:
 
 
Reported: 2010-11-17 15:56 UTC by Tetsumaki
Modified: 2010-11-18 11:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fr-command-7z.c before and after (4.43 KB, application/x-xz)
2010-11-17 15:56 UTC, Tetsumaki
Details

Description Tetsumaki 2010-11-17 15:56:02 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.
Comment 1 Pablo Castellano (IRC: pablog) 2010-11-17 19:27:07 UTC
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.
Comment 2 Pablo Castellano (IRC: pablog) 2010-11-17 19:28:18 UTC
And thanks, I'm sure file-roller maintainers/developers will appreciate it :D
Comment 3 Paolo Bacchilega 2010-11-18 10:14:42 UTC
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.
Comment 4 Tetsumaki 2010-11-18 11:53:41 UTC
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;
	}