decode_tag
tag = decode_tag(ptr, &isnew, <ype);
int decode_tag(unsigned char *ptr, int *isnew, int *ltype);