code: func WithCompression(handler http.Handler) http.Handler {
  	return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
  		wantsCompression, encoding := wantsCompressedResponse(req)
  		w.Header().Set("Vary", "Accept-Encoding")
  		if wantsCompression {
  			compressionWriter, err := NewCompressionResponseWriter(w, encoding)
  			if err != nil {
  				handleError(w, req, err)
  				runtime.HandleError(fmt.Errorf("failed to compress HTTP response: %v", err))
  				return
  			}
  			compressionWriter.Header().Set("Content-Encoding", encoding)
  			handler.ServeHTTP(compressionWriter, req)
  			compressionWriter.(*compressionResponseWriter).Close()
  		} else {
  			handler.ServeHTTP(w, req)
  		}
  	})
  }
docs: // WithCompression wraps an http.Handler with the Compression Handler