From: Robert Klemme Date: 2004-01-07T21:56:47+09:00 Subject: Re: Compression (besides Huffman) and Ruby "Jamis Buck" schrieb im Newsbeitrag news:3FFC0099.2080408@email.byu.edu... > Robert Klemme wrote: > > > > >But wouldn't it bettern then to implement it in C (or use an existing > >implementation)? I mean, C *is* portable. > > Very true. Generally, C *is* portable, and in general, such things > should be (and are) written in C. However, C is *not* portable when a > module is not available as a pre-compiled binary for a particular > platform, and the user does not have access to a C compiler (or is not a > programmer and is not confident compiling their own module). In such > cases, the value of simply dropping the module into the Ruby path is > quite high. Another reasonable conclusion is to include a ruby module for such a basic thing as (de)compression into the std distribution. At least the cygwin distribution includes Zlib: irb(main):001:0> require 'zlib' => true irb(main):002:0> ObjectSpace.each_object( Class ) {|cl| p cl if /zip|zlib/i =~ cl.name } Zlib::GzipReader Zlib::GzipWriter Zlib::GzipFile::LengthError Zlib::GzipFile::CRCError Zlib::GzipFile::NoFooter Zlib::GzipFile::Error Zlib::GzipFile Zlib::Inflate Zlib::Deflate Zlib::ZStream Zlib::VersionError Zlib::BufError Zlib::MemError Zlib::StreamError Zlib::DataError Zlib::NeedDict Zlib::StreamEnd Zlib::Error => 358 irb(main):003:0> Does that help? :-) > Anyway, I hope that has clarified my position. I'm not trying to start > a flame war on the merits of C modules versus pure Ruby modules (or even > wxWindows and FOX--those were just examples from my own personal > experience), so please don't be too vehement with any opposing opinions. :) No offense taken. Kind regards robert