private boolean encodeData(Encoder encoder, Data data) throws IOException {
		Symbol sym = data.getPrimarySymbol();
		HighCodeSymbol highSymbol;
		if (sym != null) {
			highSymbol = new HighCodeSymbol(sym.getID(), sym.getName(), data, dtmanage);
		}
		else {
			highSymbol = new HighCodeSymbol(0,
				SymbolUtilities.getDynamicName(program, data.getAddress()), data, dtmanage);
			if (data.getDataType() == DataType.DEFAULT &&
				highSymbol.getMutability() == MutabilitySettingsDefinition.NORMAL) {
				return false;
			}
		}
		if (debug != null) {
			debug.getType(highSymbol.getDataType());
		}
		Namespace namespc = (sym != null) ? sym.getParentNamespace() : null;
		encodeResult(encoder, highSymbol, namespc);
		return true;
	}
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