(data []byte)
| 47 | } |
| 48 | |
| 49 | func GZipCompress(data []byte) []byte { |
| 50 | gw := acquireGzipWriter() |
| 51 | _, _ = gw.Write(data) |
| 52 | _ = gw.Close() |
| 53 | ret := make([]byte, len(gw.buf.Bytes())) |
| 54 | copy(ret, gw.buf.Bytes()) |
| 55 | releaseGzipWriter(gw) |
| 56 | return ret |
| 57 | } |
| 58 | |
| 59 | func GZipUncompress(src []byte) []byte { |
| 60 | b := bytes.NewReader(src) |
no test coverage detected