From: Thomas Hurst Date: 2002-01-20T05:26:38+09:00 Subject: Re: Best way for platf. independent compression? * Massimiliano Mirra (list@chromatic-harp.com) wrote: > On Thu, Jan 17, 2002 at 04:48:30AM +0900, Thomas Hurst wrote: > > Depends if I get a free bag of cookies when I download any package > > that uses it :) > > Is it enough if I instead refrain from reiterating jokes about cookies > and web browsers? ;-) No. > > > from Perl's Archive::Tar, which might be a good starting point. > > Got them, I'll see what I can come up with. Archive::Tar is disgusting, btw; it's full of goto's, for a start :) > Great. It also looks like zlib might make into the standard Windows > distribution, so we might actually end up having something like Debian > packaging for Ruby. (Rubyan? errr...) -% ruby Tar.rb /usr/ports/distfiles/ruby/ruby-zlib-0.4.0.tar.gz > Reading archive /usr/ports/distfiles/ruby/ruby-zlib-0.4.0.tar.gz >>>> /ruby-zlib-0.4.0/ (0, DIR) Tar.rb:72: [BUG] Segmentation fault ruby 1.6.6 (2001-12-26) [i386-freebsd4] zsh: 11626 abort (core dumped) Initially I thought it was String#unpack because I wasn't grabbing blocks correctly, but it was actually the IO#read call via zlib. So much for it being "mature" :P I notice "Ruby/zlib has original .gz file handler of its own, using undocumented feature of zlib." on the ruby-zlib site, which makes me twitchy, but I do have a tendancy to bring out the worst in languages when I'm hacking. I'll see if it goes away when I come up with something cleaner. Anyone have any nice ideas for an Archive::* API, btw? -- Thomas 'Freaky' Hurst - freaky@aagh.net - http://www.aagh.net/ - In English, every word can be verbed. Would that it were so in our programming languages.