Class: IOStreams::Gzip::Reader
- Defined in:
- lib/io_streams/gzip/reader.rb
Instance Attribute Summary
Attributes inherited from Reader
Class Method Summary collapse
-
.stream(input_stream, original_file_name: nil, &block) ⇒ Object
Read from a gzip stream, decompressing the contents as it is read.
Methods inherited from Reader
Constructor Details
This class inherits a constructor from IOStreams::Reader
Class Method Details
.stream(input_stream, original_file_name: nil, &block) ⇒ Object
Read from a gzip stream, decompressing the contents as it is read
5 6 7 8 9 10 |
# File 'lib/io_streams/gzip/reader.rb', line 5 def self.stream(input_stream, original_file_name: nil, &block) io = ::Zlib::GzipReader.new(input_stream) block.call(io) ensure io&.close end |