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