GoLang gzdecode

is this article helpful? yes | no
GoLang replacement for PHP's gzdecode [Golang Play | edit | history]
func Gzdecode() string {
	reader := bytes.NewReader(u.Content)
	gzreader, _ := gzip.NewReader(reader)
	output, _ := ioutil.ReadAll(gzreader)
	return string(output)
}

PHP gzdecode

PHP original manual for gzdecode [ show | php.net ]

gzdecode

(PHP 5 >= 5.4.0, PHP 7)

gzdecodeDecodes a gzip compressed string

Description

string gzdecode ( string $data [, int $length ] )

This function returns a decoded version of the input data.

Parameters

data

The data to decode, encoded by gzencode().

length

The maximum length of data to decode.

Return Values

The decoded string, or FALSE if an error occurred.

See Also