Which is the best way to uncompress a 'tar.gz' file since Ruby?
Kless wrote:
Which is the best way to uncompress a 'tar.gz' file since Ruby?
I'm not sure if I'm misunderstanding you, but wouldn't that be
tar xvzf [filename]?
···
--
Posted via http://www.ruby-forum.com/\.
Kless wrote:
Which is the best way to uncompress a 'tar.gz' file since Ruby?
The more I look at your message the more I suspect that you meant using
Ruby.
Check out this recipe at
http://my.safaribooksonline.com/0596523696/rubyckbk-CHP-12-SECT-10 and
see if that helps.
···
--
Posted via http://www.ruby-forum.com/\.
Better using Ruby:
···
On 18 oct, 19:13, Adam Penny <adam_pe...@hotmail.com> wrote:
Kless wrote:
> Which is the best way to uncompress a 'tar.gz' file since Ruby?I'm not sure if I'm misunderstanding you, but wouldn't that be
tar xvzf [filename]?
----------------
tgz_file = Zlib::GzipReader.new( File.open(file, 'rb') )
Minitar.unpack(tgz_file, 'tgz_file')
----------------
There is a great library, Facets [1], with many usefull methods and
that lets too compress/uncompress easily [2].
[1] http://facets.rubyforge.org/
[2] http://facets.rubyforge.org/quick/rdoc/more/classes/ZipUtils.html