MCPcopy
hub / github.com/grpc/grpc-go / Do

Method Do

rpc_util.go:95–103  ·  view source on GitHub ↗
(w io.Writer, p []byte)

Source from the content-addressed store, hash-verified

93}
94
95func (c *gzipCompressor) Do(w io.Writer, p []byte) error {
96 z := c.pool.Get().(*gzip.Writer)
97 defer c.pool.Put(z)
98 z.Reset(w)
99 if _, err := z.Write(p); err != nil {
100 return err
101 }
102 return z.Close()
103}
104
105func (c *gzipCompressor) Type() string {
106 return "gzip"

Callers

nothing calls this directly

Calls 5

GetMethod · 0.65
PutMethod · 0.65
WriteMethod · 0.65
CloseMethod · 0.65
ResetMethod · 0.45

Tested by

no test coverage detected