github.com/grafana/pyroscope-go/godeltaprof@v0.1.8-0.20240513050943-1b1f97373e2a/internal/pprof/gzip_go16.go (about) 1 //go:build go1.16 && !go1.17 2 // +build go1.16,!go1.17 3 4 package pprof 5 6 import ( 7 "compress/gzip" 8 "io" 9 ) 10 11 type gzipWriter struct { 12 *gzip.Writer 13 } 14 15 func newGzipWriter(w io.Writer) gzipWriter { 16 zw, _ := gzip.NewWriterLevel(w, gzip.BestSpeed) 17 return gzipWriter{zw} 18 }