Sha256: f231001ee80366d9fd9fb7da6abaf316e41f75d4b357c280acb94a9a791f0103
Contents?: true
Size: 981 Bytes
Versions: 3
Compression:
Stored size: 981 Bytes
Contents
require_relative 'zlib_compressor' require_relative 'zlib_decompressor' module CcipherFactory class CompressionError < StandardError; end class DecompressionError < StandardError; end end module CcipherFactory module Compression #class CompressionError < StandardError; end #class DecompressionError < StandardError; end module NullCompressor def method_missing(mtd, *args, &block) # sink hole #args end end class Compressor def self.instance(eng = :zlib) Compressor.new end def compress self.extend(ZlibCompressor) self end def decompress self.extend(ZlibDecompressor) self end def null_engine self.extend(NullCompressor) self end def self.supported_envelope [:compression_none, :compression_zlib] end def self.rebuild(ts, &block) Compressor.new end end end end
Version data entries
3 entries across 3 versions & 1 rubygems