public void encode(Encoder encoder) throws IOException {
		encoder.openElement(ELEM_SLEIGH);
		encoder.writeSignedInteger(ATTRIB_VERSION, FORMAT_VERSION);
		encoder.writeBool(ATTRIB_BIGENDIAN, isBigEndian());
		encoder.writeSignedInteger(ATTRIB_ALIGN, alignment);
		encoder.writeUnsignedInteger(ATTRIB_UNIQBASE, getUniqueBase());
		if (maxdelayslotbytes > 0) {
			encoder.writeUnsignedInteger(ATTRIB_MAXDELAY, maxdelayslotbytes);
		}
		if (unique_allocatemask != 0) {
			encoder.writeUnsignedInteger(ATTRIB_UNIQMASK, unique_allocatemask);
		}
		if (numSections != 0) {
			encoder.writeUnsignedInteger(ATTRIB_NUMSECTIONS, numSections);
		}
		indexer.encode(encoder);
		encoder.openElement(ELEM_SPACES);
		encoder.writeString(ATTRIB_DEFAULTSPACE, getDefaultSpace().getName());
		for (int i = 0; i < numSpaces(); ++i) {
			AddrSpace spc = getSpace(i);
			if ((spc.getType() == spacetype.IPTR_CONSTANT) ||
				(spc.getType() == spacetype.IPTR_FSPEC) || (spc.getType() == spacetype.IPTR_IOP)) {
				continue;
			}
			spc.encode(encoder);
		}
		encoder.closeElement(ELEM_SPACES);
		symtab.encode(encoder);
		encoder.closeElement(ELEM_SLEIGH);
	}
Note: The value of {@link #MAX_UNIQUE_SIZE}  must match the corresponding value
defined by sleighbase.cc
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/pcodeCPort/sleighbase/SleighBase.java