class Fluent::Plugin::S3Output::LZMA2Compressor
Public Instance Methods
Source
# File lib/fluent/plugin/s3_compressor_lzma2.rb, line 21 def compress(chunk, tmp) w = Tempfile.new("chunk-xz-tmp") w.binmode chunk.write_to(w) w.close # We don't check the return code because we can't recover lzop failure. system "xz #{@command_parameter} -c #{w.path} > #{tmp.path}" ensure w.close rescue nil w.unlink rescue nil end
Source
# File lib/fluent/plugin/s3_compressor_lzma2.rb, line 8 def configure(conf) super check_command('xz', 'LZMA2') end
Calls superclass method
Fluent::Plugin::S3Output::Compressor#configure
Source
# File lib/fluent/plugin/s3_compressor_lzma2.rb, line 17 def content_type 'application/x-xz'.freeze end