Bug 2009

Summary: libXpm should use zlib for compression/decompression
Product: xorg Reporter: Alan Coopersmith <alan.coopersmith>
Component: Lib/XpmAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: enhancement    
Priority: high CC: jeremyhu, roland.mainz
Version: gitKeywords: love
Hardware: All   
OS: All   
Whiteboard: 2011BRB_Reviewed
i915 platform: i915 features:

Description Alan Coopersmith 2004-12-03 16:56:57 UTC
Currently libXpm twists through a bunch of contortions to fork/exec compress
and gzip for reading and writing .xpm.Z and .xpm.gz files.   It would be simpler,
faster, and safer to simply use zlib to do this instead - any volunteers?
Comment 1 Alex Riesen 2004-12-04 09:18:26 UTC
zlib does not do LZW (.Z), does it?
Comment 2 Roland Mainz 2004-12-04 19:47:14 UTC
(In reply to comment #1)
> zlib does not do LZW (.Z), does it?

When I try % cat foo.Z | gunzip -c | less # I can read the uncompressed content
of "foo" ... sounds that somehow at least gunzip can read files made by
/usr/bin/compress (this doesn't gurantee that libz.so can handle this
compression by default, seems we would have to do some trial-n-error testing here :)
Comment 3 Alex Riesen 2004-12-05 05:07:07 UTC
my copy of gzip (GNU 1.3.5) by does not even use zlib.
It also can't compress in LZW.
Comment 4 Stéphane Loeuillet 2005-01-03 13:34:51 UTC
from gzip homepage :

gzip produces files with a .gz extension.
gunzip can decompress files created by gzip, compress or pack.
gzip was developed as a replacement for compress because of the UNISYS and IBM
patents covering the LZW algorithm used by compress.

so, gzip misses the .Z creation

zlib only does gz/LZ77

--------

any lib available that does the LZW compression ?
Comment 5 Daniel Stone 2007-02-27 01:24:46 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 6 Jeremy Huddleston Sequoia 2011-09-24 17:19:27 UTC
libarchive?  http://code.google.com/p/libarchive/wiki/Examples
Comment 7 Adam Jackson 2018-06-12 19:09:53 UTC
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.