Class: Fluent::S3Output::GzipCompressor
- Inherits:
-
Compressor
- Object
- Compressor
- Fluent::S3Output::GzipCompressor
- Defined in:
- lib/fluent/plugin/out_s3.rb
Instance Attribute Summary
Attributes inherited from Compressor
Instance Method Summary collapse
Methods inherited from Compressor
Instance Method Details
#compress(chunk, tmp) ⇒ Object
187 188 189 190 191 192 193 194 |
# File 'lib/fluent/plugin/out_s3.rb', line 187 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
183 184 185 |
# File 'lib/fluent/plugin/out_s3.rb', line 183 def content_type 'application/x-gzip'.freeze end |
#ext ⇒ Object
179 180 181 |
# File 'lib/fluent/plugin/out_s3.rb', line 179 def ext 'gz'.freeze end |