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
313
314
315
316
317
318
319
|
# File 'lib/fluent/plugin/out_s3.rb', line 313
def compress(chunk, tmp)
w = Zlib::GzipWriter.new(tmp)
chunk.write_to(w)
w.finish
ensure
w.finish rescue nil
end
|
#content_type ⇒ Object
309
310
311
|
# File 'lib/fluent/plugin/out_s3.rb', line 309
def content_type
'application/x-gzip'.freeze
end
|
#ext ⇒ Object
305
306
307
|
# File 'lib/fluent/plugin/out_s3.rb', line 305
def ext
'gz'.freeze
end
|