public static boolean decompress(File compressed, File decompressTo) throws IOException {
		if (compressed.getName().endsWith(".rar")) {
			throw new UnsupportedOperationException("Cannot extract rar yet, file: " + compressed.getAbsolutePath());
		}
		ProcessBuilder builder = null;
		if (compressed != null && compressed.getName().endsWith(".zip")) {
			// spawn unzip prpocesses
			builder = new ProcessBuilder("jar", "xf", compressed.getAbsolutePath());
		} else if (compressed != null && compressed.getName().endsWith(".tar.gz")) {
			// spawn untar prpocesses
			builder = new ProcessBuilder("tar", "zxvf", compressed.getAbsolutePath());
		}
		if (builder == null)
			return false;

		builder.directory(decompressTo);
		Process extract = builder.start();
		boolean done = false;
		while (!done) {
			try {
				extract.exitValue();
				done = true;
			} catch (Exception e) {
				done = false;
			}
		}
		return true;
	}