From: Alberto Riva
Subject: [Announce] CL-zlib (zlib compression in CL)
Date: 
Message-ID: <3C68AE19.7050305@nospam.chip.org>
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

From: Eric Marsden
Subject: Re: [Announce] CL-zlib (zlib compression in CL)
Date: 
Message-ID: <wzilmdz6m0v.fsf@laas.fr>
>>>>> "ar" == Alberto Riva <···@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/>
From: Paolo Amoroso
Subject: Re: [Announce] CL-zlib (zlib compression in CL)
Date: 
Message-ID: <xGFqPHYl+ugQWRyu2cNFitF=7isa@4ax.com>
On Tue, 12 Feb 2002 11:18:40 +0100, Eric Marsden <········@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/]
From: Gilbert Baumann
Subject: Re: [Announce] CL-zlib (zlib compression in CL)
Date: 
Message-ID: <87k7thb85o.fsf@rubin.local>
Paolo Amoroso <·······@mclink.it> writes:

> On Tue, 12 Feb 2002 11:18:40 +0100, Eric Marsden <········@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