public void encode(Encoder encoder) throws IOException {
		encoder.openElement(ELEM_SOURCEFILES);
		for (int i = 0; i < leastUnusedIndex; ++i) {
			encoder.openElement(ELEM_SOURCEFILE);
			encoder.writeString(ATTRIB_NAME, filenameToIndex.inverse().get(i));
			encoder.writeSignedInteger(ATTRIB_INDEX, i);
			encoder.closeElement(ELEM_SOURCEFILE);
		}
		encoder.closeElement(ELEM_SOURCEFILES);
	}
Encode the index to a stream
@param encoder stream to write to
@throws IOException for errors writing to the stream
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/sleigh/grammar/SourceFileIndexer.java