N
Nicholas Wieland
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 )
=> #<StringIO:0x00000100c4c8a8>
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
difficulties.
ruby-1.9.2-p136 :009 > data = StringIO.new( open( 'test.zip', 'r' ).read )
=> #<StringIO:0x00000100c4c8a8>
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