Class: Fluent::Plugin::S3Input::GzipExtractor
Instance Attribute Summary
Attributes inherited from Extractor
#log
Instance Method Summary
collapse
Methods inherited from Extractor
#configure, #initialize
Instance Method Details
#content_type ⇒ Object
400
401
402
|
# File 'lib/fluent/plugin/in_s3.rb', line 400
def content_type
'application/x-gzip'.freeze
end
|
#ext ⇒ Object
396
397
398
|
# File 'lib/fluent/plugin/in_s3.rb', line 396
def ext
'gz'.freeze
end
|
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
|
# File 'lib/fluent/plugin/in_s3.rb', line 407
def (io)
parts = []
loop do
unused = nil
Zlib::GzipReader.wrap(io) do |gz|
parts << gz.read
unused = gz.unused
gz.finish
end
io.pos -= unused ? unused.length : 0
break if io.eof?
end
io.close
parts.join
end
|