Sha256: ecad3ba863f2232167540acaad1e92738282205971aea2a5d8be37f46b5803d2
Contents?: true
Size: 556 Bytes
Versions: 13
Compression:
Stored size: 556 Bytes
Contents
module IOStreams module Gzip class Reader # Read from a gzip file or stream, decompressing the contents as it is read def self.open(file_name_or_io, **args, &block) unless IOStreams.reader_stream?(file_name_or_io) ::Zlib::GzipReader.open(file_name_or_io, &block) else begin io = ::Zlib::GzipReader.new(file_name_or_io) block.call(io) ensure io.close if io && (io.respond_to?(:closed?) && !io.closed?) end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems