GNOME Bugzilla – Bug 683159
Add xz (LZMA2) compression
Last modified: 2012-09-01 23:17:50 UTC
Created attachment 223146 [details] Tarball with test results Currently XCF files can be saved uncompressed or compressed with gz or bz2. xz is considered to have a better compression rate than both gz and bzip2 and need less memory for compressing and decompressing than bzip2. GNU XZ (in combination with GNU TAR) is the standard package compression method in Slackware GNU/Linux. Also the LZMA2 algorithm is crucial for the success of the most popular compression program which is used by Windows users - 7Zip. I compressed a sample XCF file with three compressing methods: gz, bz2 and xz. Original file: 183,477 Bytes Gzipped file: 126,562 Bytes Bz2'ed file: 108,349 Bytes Xz'd file: 99.256 Bytes The attached tarball contains the original files and all compressed files for comparsion. It would be a huge advantage to add a xz support in The GIMP as a much better alternative to gz and bzip2.
Assigning to myself.
Pushed to master: commit fc4a192f23bb44a59e199118c8c8a7d3027d6fd1 Author: Mukund Sivaraman <muks@banu.com> Date: Sun Sep 2 04:32:04 2012 +0530 file-compressor: Add support for xz compressed files (bug #683159) This commit causes a compiler warning because string literals are of type signed char, and we use a character out of the signed range in the mimetype for xz. It can be fixed by changing the data type of the mime string to (unsigned char *), and not using string literals, but that's a bit too much for this commit. configure.ac | 29 ++++++++++++- plug-ins/file-compressor/Makefile.am | 4 +- plug-ins/file-compressor/file-compressor.c | 207 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 238 insertions(+), 2 deletions(-) Resolving as FIXED, milestone 2.10.