public int typeLen(){
		if(length<=0) return 0;
		if(tagVal() != 0x1f) return 1; 
		int k=offset+1;
		int len=2;
		while((k<length+offset) && (gs(data[k])>127)) {len++; k++;}
		if (len > length) return 0;
		return len;
	}