code: func NewCompressionResponseWriter(w http.ResponseWriter, encoding string) (http.ResponseWriter, error) {
  	var compressor Compressor
  	switch encoding {
  	case encodingGzip:
  		compressor = gzip.NewWriter(w)
  	case encodingDeflate:
  		compressor = zlib.NewWriter(w)
  	default:
  		return nil, fmt.Errorf("%s is not a supported encoding type", encoding)
  	}
  	return &compressionResponseWriter{
  		writer:     w,
  		compressor: compressor,
  		encoding:   encoding,
  	}, nil
  }
docs: // NewCompressionResponseWriter returns wraps w with a compression ResponseWriter, using the given encoding