public static List<Integer> compress(String uncompressed) {
		String w = "";
		List<Integer> result = new ArrayList<Integer>();
		for (char c : uncompressed.toCharArray()) {
//			System.out.println(uncompressed.toCharArray());
			String wc = w + c;
			System.out.print("w: "+ w + " c: "+ c + "\n");
//			System.out.println(wc);
			
			if (dictionary_global.containsKey(wc)){
				w = wc;
				System.out.println("w=wc");
			}
			else {
				System.out.println("add wc");
//				if(dictionary_global.get(w) != null){
					result.add(dictionary_global.get(w));
//				}
					System.out.println(result.toString());
				// Add wc to the dictionary.
				dictionary_global.put(wc, dictSize++);
				w = "" + c;
			}
		}
		// Output the code for w.
//		if (!w.equals(""))
//			result.add(dictionary_global.get(w));

//		System.out.println("start print dict\n");
//		System.out.println("\n");
//		System.out.println(dictionary.toString()+"\n");
		return result;
	}