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
506
507
508
509
510
511
512
|
# File 'lib/fluent/plugin/out_s3.rb', line 506
def compress(chunk, tmp)
w = Zlib::GzipWriter.new(tmp)
chunk.write_to(w)
w.finish
ensure
w.finish rescue nil
end
|
#content_type ⇒ Object
502
503
504
|
# File 'lib/fluent/plugin/out_s3.rb', line 502
def content_type
'application/x-gzip'.freeze
end
|
#ext ⇒ Object
498
499
500
|
# File 'lib/fluent/plugin/out_s3.rb', line 498
def ext
'gz'.freeze
end
|