Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Announce] CL-zlib (zlib compression in CL)

13 views
Skip to first unread message

Alberto Riva

unread,
Feb 12, 2002, 12:54:33 AM2/12/02
to
I have written a simple interface between Common Lisp (specifically ACL)
and the zlib library for data compression (http://www.zlib.org/). As you
might know, zlib is the library used by the popular gzip compression
program. CL-zlib allows you to read and write files in gzip format, and
to perform in-memory compression and decompression of strings and other
arbitrary data.

CL-zlib is available at http://chip.org/~alb/lisp.html, and runs under
Allegro CL 6 on Linux and Windows. It should be relatively easy to port
it to other platforms; if you do so, I'd appreciate hearing about it.
The package contains source code, minimal documentation, and a few examples.

Feel free to download CL-zlib and try it. I'm looking forward to your
feedback, comments, and bug reports.

--
Alberto Riva
Children's Hospital
Informatics Program

Eric Marsden

unread,
Feb 12, 2002, 5:18:40 AM2/12/02
to
>>>>> "ar" == Alberto Riva <a...@nospam.chip.org> writes:

ar> I have written a simple interface between Common Lisp
ar> (specifically ACL) and the zlib library for data compression
ar> (http://www.zlib.org/). As you might know, zlib is the library
ar> used by the popular gzip compression program. CL-zlib allows you
ar> to read and write files in gzip format, and to perform in-memory
ar> compression and decompression of strings and other arbitrary
ar> data.

related to this, there is a lisp implementation of the deflate
algorithm (used for decompression of gzipped data, and defined by
RFC1951) included with the Closure web browser.

<URL:http://www.uni-karlsruhe.de/~unk6/closure/>

--
Eric Marsden <URL:http://www.laas.fr/~emarsden/>

Paolo Amoroso

unread,
Feb 13, 2002, 8:12:20 AM2/13/02
to
On Tue, 12 Feb 2002 11:18:40 +0100, Eric Marsden <emar...@laas.fr> wrote:

> related to this, there is a lisp implementation of the deflate
> algorithm (used for decompression of gzipped data, and defined by
> RFC1951) included with the Closure web browser.
>
> <URL:http://www.uni-karlsruhe.de/~unk6/closure/>

And now also included in the McCLIM source tree.


Paolo
--
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://www.paoloamoroso.it/ency/README
[http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/]

Gilbert Baumann

unread,
Feb 13, 2002, 12:31:31 PM2/13/02
to
Paolo Amoroso <amo...@mclink.it> writes:

> On Tue, 12 Feb 2002 11:18:40 +0100, Eric Marsden <emar...@laas.fr> wrote:
>
> > related to this, there is a lisp implementation of the deflate
> > algorithm (used for decompression of gzipped data, and defined by
> > RFC1951) included with the Closure web browser.
> >
> > <URL:http://www.uni-karlsruhe.de/~unk6/closure/>
>
> And now also included in the McCLIM source tree.

Thanks you noted that.

The McCLIM version is also much more current and features a nicer
interface. For instance to display a gziped file, you can do:

(defun zcat (filename)
(with-open-file (input filename :element-type '(unsigned-byte 8))
(let ((input (make-inflating-stream input :format :gzip)))
(do ((c (read-char input nil nil) (read-char input nil nil)))
((null c))
(write-char c)))))

The interesting thing here is MAKE-INFLATING-STREAM, which
decompresses data from some other stream. Look at
McCLIM:Experimental/unzip/interface.lisp.

Gilbert

0 new messages