Sha256: e29f586c71784cfa82cf6dc29eee266787c3d1a16c6009f55cee8e330523157e
Contents?: true
Size: 525 Bytes
Versions: 10
Compression:
Stored size: 525 Bytes
Contents
module IOStreams module Gzip class Writer # Write to a file / stream, compressing with GZip def self.open(file_name_or_io, _=nil, &block) unless IOStreams.writer_stream?(file_name_or_io) Zlib::GzipWriter.open(file_name_or_io, &block) else begin io = Zlib::GzipWriter.new(file_name_or_io) block.call(io) ensure io.close if io && (io.respond_to?(:closed?) && !io.closed?) end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems