NewGzipCompressionLevel returns a Gzip-based Compression with the given level.
(level int)
| 25 | |
| 26 | // NewGzipCompressionLevel returns a Gzip-based Compression with the given level. |
| 27 | func NewGzipCompressionLevel(level int) Compression { |
| 28 | return &genericCompression{ |
| 29 | wf: func(w io.Writer) (io.WriteCloser, error) { return gzip.NewWriterLevel(w, level) }, |
| 30 | rf: func(r io.Reader) (io.ReadCloser, error) { return gzip.NewReader(r) }, |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // NewZlibCompression returns a Zlib-based Compression. |
| 35 | func NewZlibCompression() Compression { |
no outgoing calls
searching dependent graphs…