@Override
	public int openElement() throws DecoderException {
		byte header1 = endPos.getByte();
		if ((header1 & HEADER_MASK) != ELEMENT_START) {
			return 0;
		}
		endPos.getNextByte();
		int id = header1 & ELEMENTID_MASK;
		if ((header1 & HEADEREXTEND_MASK) != 0) {
			id <<= RAWDATA_BITSPERBYTE;
			id |= (endPos.getNextByte() & RAWDATA_MASK);
		}
		startPos.copy(endPos);
		curPos.copy(endPos);
		header1 = curPos.getByte();
		while ((header1 & HEADER_MASK) == ATTRIBUTE) {
			skipAttribute();
			header1 = curPos.getByte();
		}
		endPos.copy(curPos);
		curPos.copy(startPos);
		attributeRead = true;		// "Last attribute was read" is vacuously true
		return id;
	}
Close stream cached by the ingestStreamAsNeeded method.
@throws IOException for low-level problems with the stream
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PackedDecode.java