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
624
625
626
627
628
629
630
|
# File 'lib/fluent/plugin/out_s3.rb', line 624
def compress(chunk, tmp)
w = Zlib::GzipWriter.new(tmp)
chunk.write_to(w)
w.finish
ensure
w.finish rescue nil
end
|
#content_type ⇒ Object
620
621
622
|
# File 'lib/fluent/plugin/out_s3.rb', line 620
def content_type
'application/x-gzip'.freeze
end
|
#ext ⇒ Object
616
617
618
|
# File 'lib/fluent/plugin/out_s3.rb', line 616
def ext
'gz'.freeze
end
|