MCPcopy
hub / github.com/grafana/dskit / Compress

Method Compress

grpcencoding/snappy/snappy.go:42–46  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

40}
41
42func (c *compressor) Compress(w io.Writer) (io.WriteCloser, error) {
43 wr := c.writersPool.Get().(*snappy.Writer)
44 wr.Reset(w)
45 return writeCloser{wr, &c.writersPool}, nil
46}
47
48func (c *compressor) Decompress(r io.Reader) (io.Reader, error) {
49 dr := c.readersPool.Get().(*snappy.Reader)

Callers 3

TestSnappyFunction · 0.80
BenchmarkSnappyCompressFunction · 0.80

Calls 2

GetMethod · 0.65
ResetMethod · 0.45

Tested by 3

TestSnappyFunction · 0.64
BenchmarkSnappyCompressFunction · 0.64