Class: IOStreams::Bzip2::Reader
- Defined in:
- lib/io_streams/bzip2/reader.rb
Instance Attribute Summary
Attributes inherited from Reader
Class Method Summary collapse
-
.stream(input_stream, **args) ⇒ Object
Read from a Bzip2 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, **args) ⇒ Object
Read from a Bzip2 stream, decompressing the contents as it is read
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/io_streams/bzip2/reader.rb', line 5 def self.stream(input_stream, **args) Utils.load_soft_dependency("bzip2-ffi", "Bzip2", "bzip2/ffi") unless defined?(::Bzip2::FFI) begin io = ::Bzip2::FFI::Reader.new(input_stream, args) yield io ensure io&.close end end |