private void encodeOpaqueString(Encoder encoder, DataType type, int size) throws IOException {
		encoder.openElement(ELEM_TYPE);
		encodeNameIdAttributes(encoder, type);
		encoder.writeString(ATTRIB_METATYPE, "struct");
		encoder.writeSignedInteger(ATTRIB_SIZE, size);
		encoder.writeBool(ATTRIB_OPAQUESTRING, true);
		encoder.writeBool(ATTRIB_VARLENGTH, true);
		encoder.openElement(ELEM_FIELD);
		encoder.writeString(ATTRIB_NAME, "unknown_data1");
		encoder.writeSignedInteger(ATTRIB_OFFSET, 0);
		encoder.openElement(ELEM_TYPEREF);
		encoder.writeString(ATTRIB_NAME, byteMap.name);
		encoder.writeUnsignedInteger(ATTRIB_ID, byteMap.id);
		encoder.closeElement(ELEM_TYPEREF);
		encoder.closeElement(ELEM_FIELD);
		size -= 1;
		encoder.openElement(ELEM_FIELD);
		encoder.writeString(ATTRIB_NAME, "opaque_data");
		encoder.writeSignedInteger(ATTRIB_OFFSET, 1);
		encoder.openElement(ELEM_TYPE);
		encoder.writeString(ATTRIB_NAME, "");
		encoder.writeString(ATTRIB_METATYPE, "array");
		encoder.writeSignedInteger(ATTRIB_SIZE, size);
		encoder.writeSignedInteger(ATTRIB_ARRAYSIZE, size);
		encoder.openElement(ELEM_TYPEREF);
		encoder.writeString(ATTRIB_NAME, byteMap.name);
		encoder.writeUnsignedInteger(ATTRIB_ID, byteMap.id);
		encoder.closeElement(ELEM_TYPEREF);
		encoder.closeElement(ELEM_TYPE);
		encoder.closeElement(ELEM_FIELD);
		encoder.closeElement(ELEM_TYPE);
	}
Encode a string data-type whose internals are opaque (to the Decompiler) to stream.
@param encoder is the stream encoder
@param type is the opaque string
@param size is the length of the string (in bytes)
@throws IOException for errors in the underlying stream
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PcodeDataTypeManager.java