Refactored CompressionEncoder and CompressionDecoder to use interface CompressionCodec