Class: Fluent::S3Output::GzipCompressor
Instance Attribute Summary
Attributes inherited from Compressor
#buffer_type, #log
Instance Method Summary
collapse
Methods inherited from Compressor
#configure, #initialize
Instance Method Details
#compress(chunk, tmp) ⇒ Object
459
460
461
462
463
464
465
|
# File 'lib/fluent/plugin/out_s3.rb', line 459
def compress(chunk, tmp)
w = Zlib::GzipWriter.new(tmp)
chunk.write_to(w)
w.finish
ensure
w.finish rescue nil
end
|
#content_type ⇒ Object
455
456
457
|
# File 'lib/fluent/plugin/out_s3.rb', line 455
def content_type
'application/x-gzip'.freeze
end
|
#ext ⇒ Object
451
452
453
|
# File 'lib/fluent/plugin/out_s3.rb', line 451
def ext
'gz'.freeze
end
|