I've looked at zlib but could not find something simple and convenient.
Thanks
Look at archive-tar-minitar. It's available on RAA and as a RubyGem.
Stefan
Or try my rubyzip (http://rubyzip.sourceforge.net). It's available as a
gem too:
gem install rubyzip
Cheers,
Thomas
Thanks.
"Thomas Sondergaard" <ts_n...@sondergaard.cc> wrote
It uses the .tar format, but Archive::Tar::Minitar does.
-austin
--
Austin Ziegler * halos...@gmail.com
* Alternate: aus...@halostatue.ca
itsme213 wrote:
> Does rubyzip directly support zipping up a directory into a file, and vice
> versa?
Nope, but maybe I should add such methods :-)
Currently you'd do something like the following to zip everything in the
'test' and 'lib' dirs:
Zip::ZipFile::open("all.zip", true) {
|zf|
Dir['{test,lib}/**/*'].each { |f| zf.add(f, f) }
}
To unzip it to the file system again you'd do something like:
OUTDIR="out"
Zip::ZipFile::open("all.zip") {
|zf|
zf.each { |e|
fpath = File.join(OUTDIR, e.name)
FileUtils.mkdir_p(File.dirname(fpath))
zf.extract(e, fpath)
}
}
Cheers,
Thomas
"Austin Ziegler" <halos...@gmail.com> wrote in message
news:9e7db9110503...@mail.gmail.com...