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
377
378
379
380
381
382
383
|
# File 'lib/fluent/plugin/out_s3.rb', line 377
def compress(chunk, tmp)
w = Zlib::GzipWriter.new(tmp)
chunk.write_to(w)
w.finish
ensure
w.finish rescue nil
end
|
#content_type ⇒ Object
373
374
375
|
# File 'lib/fluent/plugin/out_s3.rb', line 373
def content_type
'application/x-gzip'.freeze
end
|
#ext ⇒ Object
369
370
371
|
# File 'lib/fluent/plugin/out_s3.rb', line 369
def ext
'gz'.freeze
end
|