Bug 2009 - libXpm should use zlib for compression/decompression
Summary: libXpm should use zlib for compression/decompression
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xpm (show other bugs)
Version: git
Hardware: All All
: high enhancement
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Whiteboard: 2011BRB_Reviewed
Keywords: love
Depends on:
Reported: 2004-12-03 16:56 UTC by Alan Coopersmith
Modified: 2018-06-12 19:09 UTC (History)
2 users (show)

See Also:
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.