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
204
205
206
207
208
209
210
|
# File 'lib/fluent/plugin/out_s3.rb', line 204
def compress(chunk, tmp)
w = Zlib::GzipWriter.new(tmp)
chunk.write_to(w)
w.close
ensure
w.close rescue nil
end
|
#content_type ⇒ Object
200
201
202
|
# File 'lib/fluent/plugin/out_s3.rb', line 200
def content_type
'application/x-gzip'.freeze
end
|
#ext ⇒ Object
196
197
198
|
# File 'lib/fluent/plugin/out_s3.rb', line 196
def ext
'gz'.freeze
end
|