Sha256: b4e657bac61de475b720c55331111e85ec8ebc8de9de3c8d5f633d5a2e4d27b7
Contents?: true
Size: 479 Bytes
Versions: 1
Compression:
Stored size: 479 Bytes
Contents
module IOStreams module Bzip2 class Writer < IOStreams::Writer # Write to a stream, compressing with Bzip2 def self.stream(input_stream, original_file_name: nil, **args) unless defined?(::Bzip2::FFI) Utils.load_soft_dependency("bzip2-ffi", "Bzip2", "bzip2/ffi") end begin io = ::Bzip2::FFI::Writer.new(input_stream, args) yield io ensure io&.close end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
iostreams-1.4.0 | lib/io_streams/bzip2/writer.rb |