On Monday 29 October 2001 03:55 pm, Al Chou wrote:
> Hi, all,
>
> I didn't see one in the RAA or during a quick search of the ML archive and
> Google, so I'm wondering if anyone out there has code for reading tar
> files. Perl has Archive::Tar, and I was going to write my code in Perl
> rather than port that module to Ruby, but after a few hours, I'm so
> frustrated with Perl that I'm starting to port it after all.  Someone stop
> me if they've already done something equivalent.  I really only need read
> capability, though of course a proper library would provide write as well.

If you do it, you should look at my Perl Archive::Zip module as a model for 
the OO architecture.

I've wanted to have a Archive::Any module (yes I know Schwern has written 
one, kinda...) that could be told what kind of archive to use.

I've been meaning to do Archive::Zip in Ruby but haven't had the time.

A tar reader shouldn't be too hard by itself, though; Archive/Tar.pm has the 
unpack strings and the basic logic. Perl to Ruby translation is simple.

If you don't have to deal with compressed tar files it would be even nicer, 
though I suppose the ultimate solution should be able to do this (though I 
don't think it should be built into the guts of Archive::Tar; the 
decompression interface should just look like another file).

-- 
Ned Konz
currently: Stanwood, WA
email:     ned / bike-nomad.com
homepage:  http://bike-nomad.com