@Override
	public void closeElement(int id) throws DecoderException {
		byte header1 = endPos.getNextByte();
		if ((header1 & HEADER_MASK) != ELEMENT_END) {
			throw new DecoderException("Expecting element close");
		}
		int closeId = header1 & ELEMENTID_MASK;
		if ((header1 & HEADEREXTEND_MASK) != 0) {
			closeId <<= RAWDATA_BITSPERBYTE;
			closeId |= (endPos.getNextByte() & RAWDATA_MASK);
		}
		if (id != closeId) {
			throw new DecoderException("Did not see expected closing element");
		}
	}
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