MCPcopy
hub / github.com/go-sql-driver/mysql / zCompress

Function zCompress

compress.go:61–70  ·  view source on GitHub ↗
(src []byte, dst io.Writer)

Source from the content-addressed store, hash-verified

59}
60
61func zCompress(src []byte, dst io.Writer) error {
62 zw := zwPool.Get().(*zlib.Writer)
63 zw.Reset(dst)
64 if _, err := zw.Write(src); err != nil {
65 return err
66 }
67 err := zw.Close()
68 zwPool.Put(zw)
69 return err
70}
71
72type compIO struct {
73 mc *mysqlConn

Callers 1

writePacketsMethod · 0.85

Calls 2

WriteMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected