MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / ZlibUncompress

Function ZlibUncompress

utils/binary/utils.go:30–37  ·  view source on GitHub ↗
(src []byte)

Source from the content-addressed store, hash-verified

28}
29
30func ZlibUncompress(src []byte) []byte {
31 b := bytes.NewReader(src)
32 var out bytes.Buffer
33 r, _ := zlib.NewReader(b)
34 defer r.Close()
35 _, _ = out.ReadFrom(r)
36 return out.Bytes()
37}
38
39func ZlibCompress(data []byte) []byte {
40 zw := acquireZlibWriter()

Callers 2

readSSOFrameMethod · 0.92
ParseMessageElementsFunction · 0.92

Calls 3

ReadFromMethod · 0.80
BytesMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected