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

Method Decompress

pkg/util/grpcencoding/zstd/zstd.go:70–82  ·  view source on GitHub ↗
(r io.Reader)

Source from the content-addressed store, hash-verified

68}
69
70func (c *compressor) Decompress(r io.Reader) (io.Reader, error) {
71 compressed, err := io.ReadAll(r)
72 if err != nil {
73 return nil, err
74 }
75
76 uncompressed, err := c.decoder.DecodeAll(compressed, nil)
77 if err != nil {
78 return nil, err
79 }
80
81 return bytes.NewReader(uncompressed), nil
82}
83
84func (c *compressor) Name() string {
85 return Name

Callers 2

testCompressFunction · 0.45
decompressFunction · 0.45

Calls

no outgoing calls

Tested by 2

testCompressFunction · 0.36
decompressFunction · 0.36