Sha256: 369b220690094ec1eeb5dcf09a89810d4c1c55c52e22e8c7286f03040ccde4c9
Contents?: true
Size: 511 Bytes
Versions: 46
Compression:
Stored size: 511 Bytes
Contents
require "kafka/snappy_codec" require "kafka/gzip_codec" module Kafka module Compression def self.find_codec(name) case name when nil then nil when :snappy then SnappyCodec.new when :gzip then GzipCodec.new else raise "Unknown compression codec #{name}" end end def self.find_codec_by_id(codec_id) case codec_id when 1 then GzipCodec.new when 2 then SnappyCodec.new else raise "Unknown codec id #{codec_id}" end end end end
Version data entries
46 entries across 46 versions & 1 rubygems