code: func decodeRelease(data string) (*rspb.Release, error) {
  	// base64 decode string
  	b, err := b64.DecodeString(data)
  	if err != nil {
  		return nil, err
  	}
  
  	// For backwards compatibility with releases that were stored before
  	// compression was introduced we skip decompression if the
  	// gzip magic header is not found
  	if bytes.Equal(b[0:3], magicGzip) {
  		r, err := gzip.NewReader(bytes.NewReader(b))
  		if err != nil {
  			return nil, err
  		}
  		b2, err := ioutil.ReadAll(r)
  		if err != nil {
  			return nil, err
  		}
  		b = b2
  	}
  
  	var rls rspb.Release
  	// unmarshal protobuf bytes
  	if err := proto.Unmarshal(b, &rls); err != nil {
  		return nil, err
  	}
  	return &rls, nil
  }
docs: // decodeRelease decodes the bytes in data into a release
  // type. Data must contain a base64 encoded string of a
  // valid protobuf encoding of a release, otherwise
  // an error is returned.