Class: Fluent::Plugin::S3Input::GzipExtractor

Inherits:
Extractor
  • Object
show all
Defined in:
lib/fluent/plugin/in_s3.rb

Instance Attribute Summary

Attributes inherited from Extractor

#log

Instance Method Summary collapse

Methods inherited from Extractor

#configure, #initialize

Constructor Details

This class inherits a constructor from Fluent::Plugin::S3Input::Extractor

Instance Method Details

#content_typeObject



283
284
285
# File 'lib/fluent/plugin/in_s3.rb', line 283

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

#extObject



279
280
281
# File 'lib/fluent/plugin/in_s3.rb', line 279

def ext
  'gz'.freeze
end

#extract(io) ⇒ Object



287
288
289
290
291
# File 'lib/fluent/plugin/in_s3.rb', line 287

def extract(io)
  Zlib::GzipReader.wrap(io) do |gz|
    gz.read
  end
end