# File lib/rubygems/package/tar_input.rb, line 214 def zipped_stream(entry) if defined? Rubinius or defined? Maglev then # these implementations have working Zlib zis = Zlib::GzipReader.new entry dis = zis.read is = StringIO.new(dis) else # This is Jamis Buck's Zlib workaround for some unknown issue entry.read(10) # skip the gzip header zis = Zlib::Inflate.new(-Zlib::MAX_WBITS) is = StringIO.new(zis.inflate(entry.read)) end ensure zis.finish if zis end