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 683159 - Add xz (LZMA2) compression
Add xz (LZMA2) compression
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Data
2.8.0
Other Windows
: Normal enhancement
: 2.10
Assigned To: Mukund Sivaraman
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2012-09-01 15:13 UTC by marius.spix
Modified: 2012-09-01 23:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Tarball with test results (509.50 KB, application/octet-stream)
2012-09-01 15:13 UTC, marius.spix
Details

Description marius.spix 2012-09-01 15:13:04 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.
Comment 1 Mukund Sivaraman 2012-09-01 21:30:35 UTC
Assigning to myself.
Comment 2 Mukund Sivaraman 2012-09-01 23:17:50 UTC
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.