Sha256: a744408a8a4c00a041e99aa9bc35169a7eef75e4ba31c43b9d036031deaf7e32

Contents?: true

Size: 318 Bytes

Versions: 29

Compression:

Stored size: 318 Bytes

Contents

module IOStreams
  module Gzip
    class Writer < IOStreams::Writer
      # Write to a stream, compressing with GZip
      def self.stream(input_stream, original_file_name: nil, &block)
        io = ::Zlib::GzipWriter.new(input_stream)
        block.call(io)
      ensure
        io&.close
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

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