func encodePayload(w io.Writer, payload pb.StatsPayload) error {
	gz, err := gzip.NewWriterLevel(w, gzip.BestSpeed)
	if err != nil {
		return err
	}
	defer func() {
		if err := gz.Close(); err != nil {
			log.Errorf("Error closing gzip stream when writing stats payload: %v", err)
		}
	}()
	return msgp.Encode(gz, &payload)
}
// encodePayload encodes the payload as Gzipped msgPack into w.
encodePayload encodes the payload as Gzipped msgPack into w.
// encodePayload encodes the payload as Gzipped msgPack into w .
func encodePayload(w io.Writer, payload pb.StatsPayload) error {
	gz, err := gzip.NewWriterLevel(w, gzip.BestSpeed)
	if err != nil {
		return err
	}
	defer func() {
		if err := gz.Close(); err != nil {
			log.Errorf("Error closing gzip stream when writing stats payload: %v", err)
		}
	}()
	return msgp.Encode(gz, &payload)
}
func encodePayload ( w io . Writer , payload pb . StatsPayload ) error { gz , err := gzip . NewWriterLevel ( w , gzip . BestSpeed ) if err != nil { return err } defer func ( ) { if err := gz . Close ( ) ; err != nil { log . Errorf ( " " , err ) } } ( ) return msgp . Encode ( gz , & payload ) }
encodePayload encodes the payload as Gzipped msgPack into w.
encodePayload encodes the payload as Gzipped msgPack into w .