Class: Fluent::Plugin::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
489
490
491
492
493
494
495
|
# File 'lib/fluent/plugin/out_s3.rb', line 489
def compress(chunk, tmp)
w = Zlib::GzipWriter.new(tmp)
chunk.write_to(w)
w.finish
ensure
w.finish rescue nil
end
|
#content_type ⇒ Object
485
486
487
|
# File 'lib/fluent/plugin/out_s3.rb', line 485
def content_type
'application/x-gzip'.freeze
end
|
#ext ⇒ Object
481
482
483
|
# File 'lib/fluent/plugin/out_s3.rb', line 481
def ext
'gz'.freeze
end
|