Documentation
¶
Index ¶
Constants ¶
View Source
const ( HuffmanOnly = gzip.HuffmanOnly NoCompression = gzip.NoCompression BestSpeed = gzip.BestSpeed BestCompression = gzip.BestCompression DefaultCompression = gzip.DefaultCompression )
Gzip compression levels, re-exported so callers don't depend on the backing gzip implementation.
Variables ¶
View Source
var ErrWriterNotAcquired = errors.New("using writer after release")
Functions ¶
func Gzip64Decode ¶
func Gzip64Encode ¶
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is a pooled gzip writer. Its gzip writer is permanently wired to proxy, which forwards writes to the caller's dst while the writer is acquired. The indirection lets Release detach the caller's destination in O(1) instead of paying a second flate reset just to re-point the gzip writer at io.Discard.
func GzipWriter ¶
GzipWriter returns a gzip writer reset onto `dst`, compressing at the default level. Once used, it should be sent back to the pool via `Release`
func GzipWriterLevel ¶
GzipWriterLevel returns a gzip writer reset onto `dst`, compressing at `level`. Once used, it should be sent back to the pool via `Release`
Click to show internal directories.
Click to hide internal directories.