func IsGz()

in openwhisk/filetype.go [70:77]


func IsGz(buf []byte) bool {
	// Magic number: The first two bytes are fixed (0x1f and 0x8b), which represent the magic number of a gzip file.
	// Compression method: The third byte indicates the compression method used. For gzip files, this is always  (deflate).
	return len(buf) > 3 &&
		buf[0] == 0x1f &&
		buf[1] == 0x8b &&
		buf[2] == 0x08
}