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

Function newCompressor

grpcencoding/snappy/snappy.go:23–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21}
22
23func newCompressor() *compressor {
24 c := &compressor{}
25 c.readersPool = sync.Pool{
26 New: func() interface{} {
27 return snappy.NewReader(nil)
28 },
29 }
30 c.writersPool = sync.Pool{
31 New: func() interface{} {
32 return snappy.NewBufferedWriter(nil)
33 },
34 }
35 return c
36}
37
38func (c *compressor) Name() string {
39 return Name

Callers 4

TestSnappyFunction · 0.85
BenchmarkSnappyCompressFunction · 0.85
initFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestSnappyFunction · 0.68
BenchmarkSnappyCompressFunction · 0.68