MCPcopy Create free account
hub / github.com/cortexproject/cortex / Compress

Method Compress

pkg/util/grpcencoding/snappy/snappy.go:49–53  ·  view source on GitHub ↗
(w io.Writer)

Source from the content-addressed store, hash-verified

47}
48
49func (c *compressor) Compress(w io.Writer) (io.WriteCloser, error) {
50 wr := c.writersPool.Get().(*snappy.Writer)
51 wr.Reset(w)
52 return writeCloser{wr, &c.writersPool}, nil
53}
54
55func (c *compressor) Decompress(r io.Reader) (io.Reader, error) {
56 dr := c.readersPool.Get().(*snappy.Reader)

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65
ResetMethod · 0.45

Tested by

no test coverage detected