From: Nicholas Wieland Date: 2011-03-09T20:30:27+09:00 Subject: Most simple usage of zlib or pr-zlib HI *, I'm trying to unzip a file programmatically, and having lots of difficulties. ruby-1.9.2-p136 :009 > data = StringIO.new( open( 'test.zip', 'r' ).read ) => # ruby-1.9.2-p136 :010 > Zlib::GzipReader.new(data).read Zlib::GzipFile::Error: not in gzip format This is with both zlib in stdlib and pr-zlib from github. What's strange is that the file seems in the right format: [ngw@slicingupeyeballs:~]$ file test.zip test.zip: Zip archive data, at least v1.0 to extract What I need is a supersimple solution to extract a zip file and retain the same directory structure, no more no less :) Someone worked on something like this before ? ngw