func UncompressGzip(buf []byte) ([]byte, error) {
	rbuf := bytes.NewReader(buf)
	gzipReader, _ := gzip.NewReader(rbuf)
	res, err := ioutil.ReadAll(gzipReader)
	return res, err
}
Uncompress using Gzip
package util
import (
	"bytes"
	"compress/gzip"
	"fmt"
	"io/ioutil"
	"github.com/golang/snappy"
)
type CompressType int32
const (
	UNCOMPRESSED CompressType = iota
	GZIP
	SNAPPY
)