From: Massimiliano Mirra Date: 2002-01-15T07:59:51+09:00 Subject: Re: Best way for platf. independent compression? On Tue, Jan 15, 2002 at 01:49:27AM +0900, Thomas wrote: > ruby/zlib is a ruby wrapper for zlib. Zlib is a stable library written > in C that provides deflation/inflation compression and support for > reading and writing .gz (gzip) files. There is no package format in > zlib only compression (unless you count .gz files as a package format > that can only hold a single file). ruby/zlib is unlikely to be very > buggy as it is only a wrapper around a quite stable tried and tested > library. > > rubyzip (which I wrote myself) is a pure ruby implementation (that > relies on ruby/zlib, which is not!) that provides support for reading > the familiar pkzip .zip files. All it does is interpret the pkzip > package format. The decompression is left to ruby/zlib. Beyond the > unit test suite I wrote for it, it hasn't been tested at all - the > reason being that I wrote the bulk of it over a weekend to learn ruby, > not because I needed it for anything :-) However the unit test suite > is quite good, and rubyzip is only about 420 lines of ruby, so there > is not room for that many bugs ;-) To use it you need the latest 0.5 > version of ruby/zlib - it is not quite ready yet, but you can get the > latest prerelease at http://www.blue.sky.or.jp/atelier/ruby/. I hope > that ruby/zlib will be included into the main ruby distribution, so > people can someday use rubyzip without the hassle of having to compile > and install another ruby extension first :-) > > Best regards, > > Thomas Thanks a lot, Thomas. Please shed some light on a couple of points: does rubyzip only decompress? (Which would be fine for our purposes!) You say that it depends on ruby/zlib for decompression of .zip, but doesn't ruby/zlib handle .gz's? Does ruby/zlib run effortlessly on every Ruby-supported platform? And yes, inclusion of a compression library, even a simple one, in standard Ruby distribution, would be a *big big big* plus for package handling. Massimiliano