From: Al Chou Date: 2001-10-30T10:25:57+09:00 Subject: [ruby-talk:23792] Re: tar reader? --- Ned Konz wrote: > On Monday 29 October 2001 03:55 pm, Al Chou wrote: > > 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. > I've been meaning to do Archive::Zip in Ruby but haven't had the time. Are you aware of the Zlib extension in the RAA? I haven't tried to build it yet. > 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). I'm going to translate straight from Archive::Tar to Ruby for the first pass. I need it to work first, and I'll refactor later. I don't need to deal with compressed tar files, which is a blessing. I could just do a system call to untar the archives I'm dealing with, then delete the individual files when I've finished with them, but that way I wouldn't get to contribute to the RAA. Besides, I'd rather code something more generally useful than a hack just to get this one task done. Al ===== Albert Davidson Chou Get answers to Mac questions at http://www.mac-mgrs.org/ . __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com