Project

General

Profile

Bug #10101 ยป test1.rb

script that reproduces the errors - manzo (Rafael Manzo), 07/31/2014 12:33 AM

 
require 'zlib'

f = File.open(ARGV[0], "rb")
f_gz = Zlib::GzipReader.new(f)

puts "Size of read: #{f_gz.read.size}"

str = ""
f_gz.rewind
f_gz.each_byte { |byte| str << byte }
puts "Size of each_byte: #{str.size}"

f_gz.rewind
str = ""
while !f_gz.eof?
str << f_gz.readbyte
end
puts "Size of readbyte: #{str.size}"
    (1-1/1)