private static void encodeRegister(Encoder encoder, Register reg) throws IOException {
		encoder.openElement(ELEM_ADDR);
		encoder.writeSpace(ATTRIB_SPACE, reg.getAddressSpace());
		encoder.writeUnsignedInteger(ATTRIB_OFFSET, reg.getOffset());
		encoder.writeSignedInteger(ATTRIB_SIZE, reg.getMinimumByteSize());
		encoder.closeElement(ELEM_ADDR);
	}
Encode a global variable to the stream
@param encoder is the stream encoder
@param data describes the global variable
@return true if the variable is successfully encoded
@throws IOException for errors in the underlying stream
Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileCallback.java