MCPcopy Create free account
hub / github.com/peterbourgon/diskv / NewGzipCompressionLevel

Function NewGzipCompressionLevel

compression.go:27–32  ·  view source on GitHub ↗

NewGzipCompressionLevel returns a Gzip-based Compression with the given level.

(level int)

Source from the content-addressed store, hash-verified

25
26// NewGzipCompressionLevel returns a Gzip-based Compression with the given level.
27func 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.
35func NewZlibCompression() Compression {

Callers 3

NewGzipCompressionFunction · 0.85
TestGzipBestCompressionFunction · 0.85
TestGzipBestSpeedFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestGzipBestCompressionFunction · 0.68
TestGzipBestSpeedFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…