code: func encode(src interface{}) ([]byte, error) {
  	jsoninsh, err := json.Marshal(src)
  	if err != nil {
  		return nil, err
  	}
  
  	var buf bytes.Buffer
  	gsw := gzip.NewWriter(&buf)
  	_, err = gsw.Write(jsoninsh)
  	if err != nil {
  		return nil, err
  	}
  	err = gsw.Close()
  	if err != nil {
  		return nil, err
  	}
  	return buf.Bytes(), nil
  }
docs: // encode marshals src to JSON and compresses it.