func parseStringBytes(bts []byte) (string, []byte, error) {
	if msgp.IsNil(bts) {
		bts, err := msgp.ReadNilBytes(bts)
		return "", bts, err
	}
	// read the generic representation type without decoding
	t := msgp.NextType(bts)

	var (
		err error
		i   []byte
	)
	switch t {
	case msgp.BinType:
		i, bts, err = msgp.ReadBytesZC(bts)
	case msgp.StrType:
		i, bts, err = msgp.ReadStringZC(bts)
	default:
		return "", bts, msgp.TypeError{Encoded: t, Method: msgp.StrType}
	}
	if err != nil {
		return "", bts, err
	}
	if utf8.Valid(i) {
		return string(i), bts, nil
	}
	return repairUTF8(msgp.UnsafeString(i)), bts, nil
}
// parseStringBytes reads the next type in the msgpack payload and
// converts the BinType or the StrType in a valid string.
parseStringBytes reads the next type in the msgpack payload and
converts the BinType or the StrType in a valid string.
// parseStringBytes reads the next type in the msgpack payload and // converts the BinType or the StrType in a valid string .
func parseStringBytes(bts []byte) (string, []byte, error) {
	if msgp.IsNil(bts) {
		bts, err := msgp.ReadNilBytes(bts)
		return "", bts, err
	}
	t := msgp.NextType(bts)
	var (
		err error
		i   []byte
	)
	switch t {
	case msgp.BinType:
		i, bts, err = msgp.ReadBytesZC(bts)
	case msgp.StrType:
		i, bts, err = msgp.ReadStringZC(bts)
	default:
		return "", bts, msgp.TypeError{Encoded: t, Method: msgp.StrType}
	}
	if err != nil {
		return "", bts, err
	}
	if utf8.Valid(i) {
		return string(i), bts, nil
	}
	return repairUTF8(msgp.UnsafeString(i)), bts, nil
}
func parseStringBytes ( bts [ ] byte ) ( string , [ ] byte , error ) { if msgp . IsNil ( bts ) { bts , err := msgp . ReadNilBytes ( bts ) return " " , bts , err } t := msgp . NextType ( bts ) var ( err error i [ ] byte ) switch t { case msgp . BinType : i , bts , err = msgp . ReadBytesZC ( bts ) case msgp . StrType : i , bts , err = msgp . ReadStringZC ( bts ) default : return " " , bts , msgp . TypeError { Encoded : t , Method : msgp . StrType } } if err != nil { return " " , bts , err } if utf8 . Valid ( i ) { return string ( i ) , bts , nil } return repairUTF8 ( msgp . UnsafeString ( i ) ) , bts , nil }
parseStringBytes reads the next type in the msgpack payload and
converts the BinType or the StrType in a valid string.
parseStringBytes reads the next type in the msgpack payload and converts the BinType or the StrType in a valid string .
// read the generic representation type without decoding