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
361
362
363
364
365
366
367
|
# File 'lib/fluent/plugin/out_s3.rb', line 361
def compress(chunk, tmp)
w = Zlib::GzipWriter.new(tmp)
chunk.write_to(w)
w.finish
ensure
w.finish rescue nil
end
|
#content_type ⇒ Object
357
358
359
|
# File 'lib/fluent/plugin/out_s3.rb', line 357
def content_type
'application/x-gzip'.freeze
end
|
#ext ⇒ Object
353
354
355
|
# File 'lib/fluent/plugin/out_s3.rb', line 353
def ext
'gz'.freeze
end
|