Sha256: dcfa6d22e5bf0e54c10d43cc31bce4a39eff212b3732d7195fbb2a5b302af8ac

Contents?: true

Size: 393 Bytes

Versions: 3

Compression:

Stored size: 393 Bytes

Contents

module Fluent::Plugin
  class WebHDFSOutput < Output
    class GzipCompressor < Compressor
      WebHDFSOutput.register_compressor('gzip', self)

      def initialize(options = {})
        require "zlib"
      end

      def ext
        ".gz"
      end

      def compress(chunk, tmp)
        w = Zlib::GzipWriter.new(tmp)
        chunk.write_to(w)
        w.close
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fluent-plugin-webhdfs-1.1.0 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-1.0.0 lib/fluent/plugin/webhdfs_compressor_gzip.rb
fluent-plugin-webhdfs-0.6.0rc1 lib/fluent/plugin/webhdfs_compressor_gzip.rb