func ReadMapKeyZC(b []byte) ([]byte, []byte, error) {
	o, b, err := ReadStringZC(b)
	if err != nil {
		if tperr, ok := err.(TypeError); ok && tperr.Encoded == BinType {
			return ReadBytesZC(b)
		}
		return nil, b, err
	}
	return o, b, nil
}
ReadMapKeyZC attempts to read a map key
from 'b' and returns the key bytes and the remaining bytes
Possible errors:
- ErrShortBytes (too few bytes)
- TypeError{} (not a str or bin)
package msgp
import (
	"bytes"
	"encoding/binary"
	"math"
	"time"
)
var big = binary.BigEndian
func NextType(b []byte) Type {
	if len(b) == 0 {
		return InvalidType
	}
	spec := sizes[b[0]]
	t := spec.typ
	if t == ExtensionType && len(b) > int(spec.size) {
		var tp int8
		if spec.extra == constsize {
			tp = int8(b[1])
		} else {
			tp = int8(b[spec.size-1])
		}
		switch tp {
		case TimeExtension:
			return TimeType
		case Complex128Extension:
			return Complex128Type
		case Complex64Extension:
			return Complex64Type
		default:
			return ExtensionType
		}
	}
	return t
}
func IsNil(b []byte) bool {
	if len(b) != 0 && b[0] == mnil {
		return true
	}
	return false
}
type Raw []byte
func (r Raw) MarshalMsg(b []byte) ([]byte, error) {
	i := len(r)
	if i == 0 {
		return AppendNil(b), nil
	}
	o, l := ensure(b, i)
	copy(o[l:], []byte(r))
	return o, nil
}
func (r *Raw) UnmarshalMsg(b []byte) ([]byte, error) {
	l := len(b)
	out, err := Skip(b)
	if err != nil {
		return b, err
	}
	rlen := l - len(out)
	if IsNil(b[:rlen]) {
		rlen = 0
	}
	if cap(*r) < rlen {
		*r = make(Raw, rlen)
	} else {
		*r = (*r)[0:rlen]
	}
	copy(*r, b[:rlen])
	return out, nil
}
func (r Raw) EncodeMsg(w *Writer) error {
	if len(r) == 0 {
		return w.WriteNil()
	}
	_, err := w.Write([]byte(r))
	return err
}
func (r *Raw) DecodeMsg(f *Reader) error {
	*r = (*r)[:0]
	err := appendNext(f, (*[]byte)(r))
	if IsNil(*r) {
		*r = (*r)[:0]
	}
	return err
}
func (r Raw) Msgsize() int {
	l := len(r)
	if l == 0 {
		return 1  
	}
	return l
}
func appendNext(f *Reader, d *[]byte) error {
	amt, o, err := getNextSize(f.R)
	if err != nil {
		return err
	}
	var i int
	*d, i = ensure(*d, int(amt))
	_, err = f.R.ReadFull((*d)[i:])
	if err != nil {
		return err
	}
	for o > 0 {
		err = appendNext(f, d)
		if err != nil {
			return err
		}
		o--
	}
	return nil
}
func (r *Raw) MarshalJSON() ([]byte, error) {
	var buf bytes.Buffer
	_, err := UnmarshalAsJSON(&buf, []byte(*r))
	return buf.Bytes(), err
}
func ReadMapHeaderBytes(b []byte) (sz uint32, o []byte, err error) {
	l := len(b)
	if l < 1 {
		err = ErrShortBytes
		return
	}
	lead := b[0]
	if isfixmap(lead) {
		sz = uint32(rfixmap(lead))
		o = b[1:]
		return
	}
	switch lead {
	case mmap16:
		if l < 3 {
			err = ErrShortBytes
			return
		}
		sz = uint32(big.Uint16(b[1:]))
		o = b[3:]
		return
	case mmap32:
		if l < 5 {
			err = ErrShortBytes
			return
		}
		sz = big.Uint32(b[1:])
		o = b[5:]
		return
	default:
		err = badPrefix(MapType, lead)
		return
	}
}