Class: Fluent::Plugin::AzureStorageGen2Output::GzipCompressor
- Inherits:
-
Compressor
- Object
- Compressor
- Fluent::Plugin::AzureStorageGen2Output::GzipCompressor
show all
- Defined in:
- lib/fluent/plugin/out_azurestorage_gen2.rb
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
706
707
708
709
710
711
712
|
# File 'lib/fluent/plugin/out_azurestorage_gen2.rb', line 706
def compress(chunk, tmp)
w = Zlib::GzipWriter.new(tmp)
chunk.write_to(w)
w.finish
ensure
w.finish rescue nil
end
|
#content_type ⇒ Object
702
703
704
|
# File 'lib/fluent/plugin/out_azurestorage_gen2.rb', line 702
def content_type
'application/x-gzip'.freeze
end
|
#ext ⇒ Object
698
699
700
|
# File 'lib/fluent/plugin/out_azurestorage_gen2.rb', line 698
def ext
'gz'.freeze
end
|