protected void writeHeader(int header, int id) throws IOException {
		if (id > 0x1f) {
			header |= HEADEREXTEND_MASK;
			header |= (id >> RAWDATA_BITSPERBYTE);
			int extendByte = (id & RAWDATA_MASK) | RAWDATA_MARKER;
			outStream.write(header);
			outStream.write(extendByte);
		}
		else {
			header |= id;
			outStream.write(header);
		}
	}
A byte-based encoder designed to marshal to the decompiler efficiently
See {@code PackedDecode} for details of the encoding format
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PackedEncode.java