From: "Mauricio Fernández" Date: 2004-09-07T06:45:28+09:00 Subject: Re: ruby archiver On Tue, Sep 07, 2004 at 06:26:34AM +0900, Austin Ziegler wrote: > On Tue, 7 Sep 2004 04:25:10 +0900, Martin DeMello > wrote: > > Is there any pure-ruby way to pack multiple files into a single file, > > and unpack them later? Compression is optional. > > As a matter of fact, you can use either Jamis Buck's tar.rb or my > forthcoming Archive::Tar::Minitar based on work by Mauricio Fernandez > (aka batsman). That code has the nice property of working with IO-like objects and being able to operate in 'streaming mode' (i.e. no seek/rewind calls), which means you can compress as you write the tar. For instance, in rpa-base, the following is done in one step, with no intermediate files data files, lots of them =====> tar ====> gzip data.tar.gz \_____ tar ==> .rpa file / metadata =====> gzip metadata.gz you add data files to the "inner tar", which outputs to a GZipWriter, which writes into the outer tar, which is being written to disk. -- Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com