GzipWriter
Overview
GzipWriter wraps dst with a gzip writer; caller must Close the writer.
Part of the compress package — Node.js analog: zlib.
Signature
go
func GzipWriter(dst io.Writer) *gzip.WriterCompare: Node.js · Standard Go · gox
js
// Typical zlib pattern in Node.jsgo
// Use the underlying stdlib or driver directly.
// See package overview for escape hatches.go
import "github.com/sahilkhaire/gox/compress"
compress.GzipWriter(w)Example
go
import "github.com/sahilkhaire/gox/compress"
compress.GzipWriter(w)Tips
Import github.com/sahilkhaire/gox/compress and call GzipWriter directly. See the comparison below for the standard library equivalent.
Standard library alternative
gox wraps the Go standard library or a trusted dependency with Node-familiar naming. You can use the underlying library directly — see the package overview for escape hatches.