Skip to content
Node: zlibgithub.com/sahilkhaire/gox/compress

GzipReader

Overview ​

GzipReader wraps a gzip reader over src.

Part of the compress package — Node.js analog: zlib.

Signature ​

go
func GzipReader(src io.Reader) (*gzip.Reader, error)

Compare: Node.js · Standard Go · gox ​

js
// Typical zlib pattern in Node.js
go
// Use the underlying stdlib or driver directly.
// See package overview for escape hatches.
go
import "github.com/sahilkhaire/gox/compress"

result, err := compress.GzipReader(strings.NewReader("data"))
if err != nil {
    return err
}

Example ​

go
import "github.com/sahilkhaire/gox/compress"

result, err := compress.GzipReader(strings.NewReader("data"))
if err != nil {
    return err
}

Tips ​

Import github.com/sahilkhaire/gox/compress and call GzipReader 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.

← Back to compress package overview

MIT Licensed · Built for Node.js developers moving to Go