Class: Fluent::S3Output::GzipCompressor
- Inherits:
-
Compressor
- Object
- Compressor
- Fluent::S3Output::GzipCompressor
- Defined in:
- lib/fluent/plugin/out_s3.rb
Instance Method Summary collapse
Methods inherited from Compressor
Instance Method Details
#compress(chunk, tmp) ⇒ Object
184 185 186 187 188 189 190 191 |
# File 'lib/fluent/plugin/out_s3.rb', line 184 def compress(chunk, tmp) w = Zlib::GzipWriter.new(tmp) chunk.write_to(w) w.close ensure w.close rescue nil w.unlink rescue nil end |
#content_type ⇒ Object
180 181 182 |
# File 'lib/fluent/plugin/out_s3.rb', line 180 def content_type 'application/x-gzip'.freeze end |
#ext ⇒ Object
176 177 178 |
# File 'lib/fluent/plugin/out_s3.rb', line 176 def ext 'gz'.freeze end |