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

Gunzip

Overview

Gunzip decompresses gzip data.

If you are coming from Node.js, the closest pattern is gunzipSync.

Signature

go
func Gunzip(data []byte) ([]byte, error)

Compare: Node.js · Standard Go · gox

js
gunzipSync
go
// compress/gzip NewWriter / NewReader
go
import "github.com/sahilkhaire/gox/compress"

compress.Gunzip(data)

Example

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

compress.Gunzip(data)

Tips

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