TJ Atkins <JackalMage@gmail.com> wrote:
| Kenneth Tilton <kentil...@gmail.com> wrote:
| > Lisp doesn't even have a library to compress a string for interweb
| > transmission. I bet Ruby and F# and Clojure and Qi and Lisp have one.
| The most obvious thing to roll out of a google search is
The most obvious thing to roll out of my netnews archives was this:
Subject: inflate implementation (new opensource module)
From: John Foderaro <email@example.com>
Date: Mon, 12 Nov 2001 16:58:03 -0800
I've just published the code to Inflate a byte stream
compressed by the Deflate algorithm. Deflate is
ths most common compression algorithm used in zip files
and jar files. It is also the compression algorithm
used by gzip.
I have code to add this inflator to a simple-stream
via encapsulation, and I'll be releasing that in a few weeks.
Details and code can be found here:
I've only tested in on ACL 6.0 and ACL 6.1.
Subject: Re: Q: easy to use, efficient code for reading ZIPed or GZIPed text files?
From: David Lichteblau <firstname.lastname@example.org>
Date: 15 Aug 2007 16:50:36 GMT
Put the following code into the package Franz' inflate routines are in.
(For example using the ZIP package, which includes inflate.cl.)
Use like this:
(with-open-file (s "passwd.gz" :element-type '(unsigned-byte 8))
(let ((r (flexi-streams:make-flexi-stream (zip::make-inflate-stream s))))
(loop for line = (read-line r nil)
do (print line))))
;;;; (c) David Lichteblau, X11-style license
...[remainder elided, see original article for full text]...
Rob Warnock <email@example.com>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607