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

	var (
		i   int64
		u   uint64
		err error
	)
	switch t {
	case msgp.UintType:
		u, bts, err = msgp.ReadUint64Bytes(bts)
		if err != nil {
			return 0, bts, err
		}
		return u, bts, err
	case msgp.IntType:
		i, bts, err = msgp.ReadInt64Bytes(bts)
		if err != nil {
			return 0, bts, err
		}
		return uint64(i), bts, nil
	default:
		return 0, bts, msgp.TypeError{Encoded: t, Method: msgp.IntType}
	}
}
// parseUint64Bytes parses an uint64 even if the sent value is an int64;
// this is required because the language used for the encoding library
// may not have unsigned types. An example is early version of Java
// (and so JRuby interpreter) that encodes uint64 as int64:
// http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
parseUint64Bytes parses an uint64 even if the sent value is an int64;
this is required because the language used for the encoding library
may not have unsigned types.
// parseUint64Bytes parses an uint64 even if the sent value is an int64 ; // this is required because the language used for the encoding library // may not have unsigned types . An example is early version of Java // ( and so JRuby interpreter ) that encodes uint64 as int64 : // http : // docs . oracle . com / javase / tutorial / java / nutsandbolts / datatypes . html
func parseUint64Bytes(bts []byte) (uint64, []byte, error) {
	if msgp.IsNil(bts) {
		bts, err := msgp.ReadNilBytes(bts)
		return 0, bts, err
	}
	t := msgp.NextType(bts)
	var (
		i   int64
		u   uint64
		err error
	)
	switch t {
	case msgp.UintType:
		u, bts, err = msgp.ReadUint64Bytes(bts)
		if err != nil {
			return 0, bts, err
		}
		return u, bts, err
	case msgp.IntType:
		i, bts, err = msgp.ReadInt64Bytes(bts)
		if err != nil {
			return 0, bts, err
		}
		return uint64(i), bts, nil
	default:
		return 0, bts, msgp.TypeError{Encoded: t, Method: msgp.IntType}
	}
}
func parseUint64Bytes ( bts [ ] byte ) ( uint64 , [ ] byte , error ) { if msgp . IsNil ( bts ) { bts , err := msgp . ReadNilBytes ( bts ) return 0 , bts , err } t := msgp . NextType ( bts ) var ( i int64 u uint64 err error ) switch t { case msgp . UintType : u , bts , err = msgp . ReadUint64Bytes ( bts ) if err != nil { return 0 , bts , err } return u , bts , err case msgp . IntType : i , bts , err = msgp . ReadInt64Bytes ( bts ) if err != nil { return 0 , bts , err } return uint64 ( i ) , bts , nil default : return 0 , bts , msgp . TypeError { Encoded : t , Method : msgp . IntType } } }
parseUint64Bytes parses an uint64 even if the sent value is an int64;
this is required because the language used for the encoding library
may not have unsigned types.
parseUint64Bytes parses an uint64 even if the sent value is an int64 ; this is required because the language used for the encoding library may not have unsigned types .
// read the generic representation type without decoding