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
283
284
285
|
# File 'lib/fluent/plugin/in_s3.rb', line 283
def content_type
'application/x-gzip'.freeze
end
|
#ext ⇒ Object
279
280
281
|
# File 'lib/fluent/plugin/in_s3.rb', line 279
def ext
'gz'.freeze
end
|
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
|
# File 'lib/fluent/plugin/in_s3.rb', line 290
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
|