func GzipEncoding() Encoding {
	return Encoding{
		FileExt:         ".gz",
		ContentEncoding: "gzip",
		Decoder: func(r io.Reader) (io.Reader, error) {
			return gzip.NewReader(r)
		},
		Encoder: func(r io.Reader) ([]byte, error) {
			res := bytes.NewBuffer(nil)
			w := gzip.NewWriter(res)

			if _, err := io.Copy(w, r); err != nil {
				return nil, err
			}

			if err := w.Close(); err != nil {
				return nil, err
			}

			return res.Bytes(), nil
		},
	}
}
// GzipEncoding provides gzip Encoding.
GzipEncoding provides gzip Encoding.
// GzipEncoding provides gzip Encoding .
func GzipEncoding() Encoding {
	return Encoding{
		FileExt:         ".gz",
		ContentEncoding: "gzip",
		Decoder: func(r io.Reader) (io.Reader, error) {
			return gzip.NewReader(r)
		},
		Encoder: func(r io.Reader) ([]byte, error) {
			res := bytes.NewBuffer(nil)
			w := gzip.NewWriter(res)
			if _, err := io.Copy(w, r); err != nil {
				return nil, err
			}
			if err := w.Close(); err != nil {
				return nil, err
			}
			return res.Bytes(), nil
		},
	}
}
func GzipEncoding ( ) Encoding { return Encoding { FileExt : " " , ContentEncoding : " " , Decoder : func ( r io . Reader ) ( io . Reader , error ) { return gzip . NewReader ( r ) } , Encoder : func ( r io . Reader ) ( [ ] byte , error ) { res := bytes . NewBuffer ( nil ) w := gzip . NewWriter ( res ) if _ , err := io . Copy ( w , r ) ; err != nil { return nil , err } if err := w . Close ( ) ; err != nil { return nil , err } return res . Bytes ( ) , nil } , } }
GzipEncoding provides gzip Encoding.
GzipEncoding provides gzip Encoding .