String jvxlUncompressString(String data) {
		if (data.indexOf("~") < 0)
			return data;
		if (logCompression)
			Logger.info(data.length() + " uncompressing\n" + data);
		String dataOut = "";
		char chLast = '\0';
		for (int i = 0; i < data.length(); i++) {
			char ch = data.charAt(i);
			if (ch == '~') {
				int nChar = parseInt(data, ++i);
				if (nChar == Integer.MIN_VALUE) {
					if (chLast == '~') {
						dataOut += '~';
						while ((ch = data.charAt(++i)) == '~')
							dataOut += '~';
					}
					else {
						Logger.error("Error uncompressing string " + data.substring(0, i) + "?");
					}
				}
				else {
					for (int c = 0; c < nChar; c++)
						dataOut += chLast;
					i = ichNextParse;
				}
			}
			else {
				dataOut += ch;
				chLast = ch;
			}
		}
		if (logCompression)
			Logger.info(dataOut.length() + "\n" + dataOut);
		return dataOut;
	}