[plt-scheme] inflate, jar/zip compatibility?

From: David A. Herman (dherman at ccs.neu.edu)
Date: Thu Jul 15 16:38:04 EDT 2004

Hello,

I'd like to read in a Java JAR file to load the standard library of
classes for a Java interpreter, but the inflate.ss library doesn't seem to
be compatible with the file format of the standard Java runtime JAR.

The following code causes an "error in compressed data":

    (with-input-from-file "/usr/local/j2sdk1.4.2_04/jre/lib/rt.jar"
      (lambda ()
        (inflate (current-input-port)
                 (current-output-port))))

Is this because the rt.jar file doesn't use compression, or maybe that
it's a newer zip format? Or am I just using `inflate' wrong?
(Incidentally, I don't see how to use it to distinguish separate zip file
entries.)

Thanks,
Dave


Posted on the users mailing list.