class Fluent::Plugin::GzipParser

Public Instance Methods

compress(string, level = Zlib::DEFAULT_COMPRESSION, strategy = Zlib::DEFAULT_STRATEGY) click to toggle source
# File lib/fluent/plugin/parser_gzip.rb, line 21
def compress(string, level = Zlib::DEFAULT_COMPRESSION, strategy = Zlib::DEFAULT_STRATEGY)
  output = Stream.new
  gz = Zlib::GzipWriter.new(output, level, strategy)
  gz.write(string)
  gz.close
  output.string
end
configure(conf) click to toggle source
Calls superclass method
# File lib/fluent/plugin/parser_gzip.rb, line 10
def configure(conf)
  super
end
parse(text) { |x| ... } click to toggle source
# File lib/fluent/plugin/parser_gzip.rb, line 14
def parse(text)
  log.debug("Parsing: #{text}")
  x = compress(text)
  log.debug("After compress: #{x}")
  yield x
end