func AddCodec(name string, data []byte) ([]byte, error) {
	id, err := ID(name)
	if err != nil {
		return nil, err
	}
	buf := make([]byte, binary.MaxVarintLen64)
	size := binary.PutUvarint(buf, id)
	res := make([]byte, size+len(data))
	copy(res, buf[0:size])
	copy(res[size:], data)
	return res, nil
}
// AddCodec adds a codec prefix to a byte array.
// It returns a new byte array with the relevant codec prefixed.
AddCodec adds a codec prefix to a byte array.
It returns a new byte array with the relevant codec prefixed.
// AddCodec adds a codec prefix to a byte array . // It returns a new byte array with the relevant codec prefixed .
func AddCodec(name string, data []byte) ([]byte, error) {
	id, err := ID(name)
	if err != nil {
		return nil, err
	}
	buf := make([]byte, binary.MaxVarintLen64)
	size := binary.PutUvarint(buf, id)
	res := make([]byte, size+len(data))
	copy(res, buf[0:size])
	copy(res[size:], data)
	return res, nil
}
func AddCodec ( name string , data [ ] byte ) ( [ ] byte , error ) { id , err := ID ( name ) if err != nil { return nil , err } buf := make ( [ ] byte , binary . MaxVarintLen64 ) size := binary . PutUvarint ( buf , id ) res := make ( [ ] byte , size + len ( data ) ) copy ( res , buf [ 0 : size ] ) copy ( res [ size : ] , data ) return res , nil }
AddCodec adds a codec prefix to a byte array.
AddCodec adds a codec prefix to a byte array .