Sha256: 3a38199a0f9d5017f3bfe1dbd77d3df4e27798535783e9d442db3b226d992c99

Contents?: true

Size: 343 Bytes

Versions: 27

Compression:

Stored size: 343 Bytes

Contents

module IOStreams
  module Gzip
    class Reader < IOStreams::Reader
      # Read from a gzip stream, decompressing the contents as it is read
      def self.stream(input_stream, original_file_name: nil, &block)
        io = ::Zlib::GzipReader.new(input_stream)
        block.call(io)
      ensure
        io&.close
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
iostreams-1.10.1 lib/io_streams/gzip/reader.rb
iostreams-1.10.0 lib/io_streams/gzip/reader.rb
iostreams-1.9.0 lib/io_streams/gzip/reader.rb
iostreams-1.8.0 lib/io_streams/gzip/reader.rb
iostreams-1.7.0 lib/io_streams/gzip/reader.rb
iostreams-1.6.2 lib/io_streams/gzip/reader.rb
iostreams-1.6.1 lib/io_streams/gzip/reader.rb
iostreams-1.6.0 lib/io_streams/gzip/reader.rb
iostreams-1.5.1 lib/io_streams/gzip/reader.rb
iostreams-1.5.0 lib/io_streams/gzip/reader.rb
iostreams-1.4.0 lib/io_streams/gzip/reader.rb
iostreams-1.3.3 lib/io_streams/gzip/reader.rb
iostreams-1.3.2 lib/io_streams/gzip/reader.rb
iostreams-1.3.1 lib/io_streams/gzip/reader.rb
iostreams-1.3.0 lib/io_streams/gzip/reader.rb
iostreams-1.2.1 lib/io_streams/gzip/reader.rb
iostreams-1.2.0 lib/io_streams/gzip/reader.rb
iostreams-1.1.1 lib/io_streams/gzip/reader.rb
iostreams-1.1.0 lib/io_streams/gzip/reader.rb
iostreams-1.0.0 lib/io_streams/gzip/reader.rb