(w *GzipWriter)
| 44 | } |
| 45 | |
| 46 | func releaseGzipWriter(w *GzipWriter) { |
| 47 | // See https://golang.org/issue/23199 |
| 48 | const maxSize = 1 << 16 |
| 49 | if w.buf.Cap() < maxSize { |
| 50 | w.buf.Reset() |
| 51 | gzipPool.Put(w) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | type zlibWriter struct { |
| 56 | w *zlib.Writer |