Class: Fluent::Plugin::AzureStorageGen2Output::GzipCompressor

Inherits:
Compressor
  • Object
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

Constructor Details

This class inherits a constructor from Fluent::Plugin::AzureStorageGen2Output::Compressor

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_typeObject



702
703
704
# File 'lib/fluent/plugin/out_azurestorage_gen2.rb', line 702

def content_type
  'application/x-gzip'.freeze
end

#extObject



698
699
700
# File 'lib/fluent/plugin/out_azurestorage_gen2.rb', line 698

def ext
  'gz'.freeze
end