C
cmercier
Hi,
I'm trying to inflate a gzip file but for whatever reason, it always
gives me the error "unexpected end of file". I tried with 3 different
..gz file and I always get the same result. Can anyone help please?
Thanks!
Here's my code:
----
require 'zlib'
zip_file ='tmp_downloads/edu.zone.gz'
output_path = 'tmp_downloads/tmp/'
f = File.open(zip_file)
gz = Zlib::GzipReader.new(f)
print gz.read
gz.close
----
and the error
test.rb:9:in `read': unexpected end of file (Zlib::GzipFile::Error)
from test.rb:9
I'm trying to inflate a gzip file but for whatever reason, it always
gives me the error "unexpected end of file". I tried with 3 different
..gz file and I always get the same result. Can anyone help please?
Thanks!
Here's my code:
----
require 'zlib'
zip_file ='tmp_downloads/edu.zone.gz'
output_path = 'tmp_downloads/tmp/'
f = File.open(zip_file)
gz = Zlib::GzipReader.new(f)
print gz.read
gz.close
----
and the error
test.rb:9:in `read': unexpected end of file (Zlib::GzipFile::Error)
from test.rb:9