public void encode(Encoder encoder) throws IOException {
		encoder.openElement(ELEM_DATA_ORGANIZATION);

		// NOTE: endianness intentionally omitted from output

		if (absoluteMaxAlignment != NO_MAXIMUM_ALIGNMENT) {
			encoder.openElement(ELEM_ABSOLUTE_MAX_ALIGNMENT);
			encoder.writeSignedInteger(ATTRIB_VALUE, absoluteMaxAlignment);
			encoder.closeElement(ELEM_ABSOLUTE_MAX_ALIGNMENT);
		}
		if (machineAlignment != DEFAULT_MACHINE_ALIGNMENT) {
			encoder.openElement(ELEM_MACHINE_ALIGNMENT);
			encoder.writeSignedInteger(ATTRIB_VALUE, machineAlignment);
			encoder.closeElement(ELEM_MACHINE_ALIGNMENT);
		}
		if (defaultAlignment != DEFAULT_DEFAULT_ALIGNMENT) {
			encoder.openElement(ELEM_DEFAULT_ALIGNMENT);
			encoder.writeSignedInteger(ATTRIB_VALUE, defaultAlignment);
			encoder.closeElement(ELEM_DEFAULT_ALIGNMENT);
		}
		if (defaultPointerAlignment != DEFAULT_DEFAULT_POINTER_ALIGNMENT) {
			encoder.openElement(ELEM_DEFAULT_POINTER_ALIGNMENT);
			encoder.writeSignedInteger(ATTRIB_VALUE, defaultPointerAlignment);
			encoder.closeElement(ELEM_DEFAULT_POINTER_ALIGNMENT);
		}

		// Always output pointer size
		encoder.openElement(ELEM_POINTER_SIZE);
		encoder.writeSignedInteger(ATTRIB_VALUE, pointerSize);
		encoder.closeElement(ELEM_POINTER_SIZE);

		if (pointerShift != DEFAULT_POINTER_SHIFT) {
			encoder.openElement(ELEM_POINTER_SHIFT);
			encoder.writeSignedInteger(ATTRIB_VALUE, pointerShift);
			encoder.closeElement(ELEM_POINTER_SHIFT);
		}
		if (isSignedChar != DEFAULT_CHAR_IS_SIGNED) {
			encoder.openElement(ELEM_CHAR_TYPE);
			encoder.writeBool(ATTRIB_SIGNED, isSignedChar);
			encoder.closeElement(ELEM_CHAR_TYPE);
		}
		if (charSize != DEFAULT_CHAR_SIZE) {
			encoder.openElement(ELEM_CHAR_SIZE);
			encoder.writeSignedInteger(ATTRIB_VALUE, charSize);
			encoder.closeElement(ELEM_CHAR_SIZE);
		}
		if (wideCharSize != DEFAULT_WIDE_CHAR_SIZE) {
			encoder.openElement(ELEM_WCHAR_SIZE);
			encoder.writeSignedInteger(ATTRIB_VALUE, wideCharSize);
			encoder.closeElement(ELEM_WCHAR_SIZE);
		}
		if (shortSize != DEFAULT_SHORT_SIZE) {
			encoder.openElement(ELEM_SHORT_SIZE);
			encoder.writeSignedInteger(ATTRIB_VALUE, shortSize);
			encoder.closeElement(ELEM_SHORT_SIZE);
		}
		if (integerSize != DEFAULT_INT_SIZE) {
			encoder.openElement(ELEM_INTEGER_SIZE);
			encoder.writeSignedInteger(ATTRIB_VALUE, integerSize);
			encoder.closeElement(ELEM_INTEGER_SIZE);
		}
		if (longSize != DEFAULT_LONG_SIZE) {
			encoder.openElement(ELEM_LONG_SIZE);
			encoder.writeSignedInteger(ATTRIB_VALUE, longSize);
			encoder.closeElement(ELEM_LONG_SIZE);
		}
		if (longLongSize != DEFAULT_LONG_LONG_SIZE) {
			encoder.openElement(ELEM_LONG_LONG_SIZE);
			encoder.writeSignedInteger(ATTRIB_VALUE, longLongSize);
			encoder.closeElement(ELEM_LONG_LONG_SIZE);
		}
		if (floatSize != DEFAULT_FLOAT_SIZE) {
			encoder.openElement(ELEM_FLOAT_SIZE);
			encoder.writeSignedInteger(ATTRIB_VALUE, floatSize);
			encoder.closeElement(ELEM_FLOAT_SIZE);
		}
		if (doubleSize != DEFAULT_DOUBLE_SIZE) {
			encoder.openElement(ELEM_DOUBLE_SIZE);
			encoder.writeSignedInteger(ATTRIB_VALUE, doubleSize);
			encoder.closeElement(ELEM_DOUBLE_SIZE);
		}
		if (longDoubleSize != DEFAULT_LONG_DOUBLE_SIZE) {
			encoder.openElement(ELEM_LONG_DOUBLE_SIZE);
			encoder.writeSignedInteger(ATTRIB_VALUE, longDoubleSize);
			encoder.closeElement(ELEM_LONG_DOUBLE_SIZE);
		}
		if (sizeAlignmentMap.size() != 0) {
			encoder.openElement(ELEM_SIZE_ALIGNMENT_MAP);
			for (int key : sizeAlignmentMap.keySet()) {
				encoder.openElement(ELEM_ENTRY);
				int value = sizeAlignmentMap.get(key);
				encoder.writeSignedInteger(ATTRIB_SIZE, key);
				encoder.writeSignedInteger(ATTRIB_ALIGNMENT, value);
				encoder.closeElement(ELEM_ENTRY);
			}
			encoder.closeElement(ELEM_SIZE_ALIGNMENT_MAP);
		}
		bitFieldPacking.encode(encoder);
		encoder.closeElement(ELEM_DATA_ORGANIZATION);
	}
Output the details of this data organization to a encoded document formatter.
@param encoder the output document encoder.
@throws IOException if an IO error occurs while encoding/writing output
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/DataOrganizationImpl.java