public String decodeData(List<Integer> data) {
		wbDecoding = new HashMap<Integer, String>();
		wbEncoding = new HashMap<String, Integer>();

		StringBuffer rv = new StringBuffer();

		List<StringBuffer> cache = new LinkedList<StringBuffer>();

		int nextIndex = 256;
		
		for (int i : data) {
			if (i < 256) {
				wbEncoding.put(Character.toString((char) i), i);
				wbDecoding.put(i, Character.toString((char) i));
			}

			rv.append(wbDecoding.get(i));

			// process cache entries
			List<StringBuffer> rm = new LinkedList<StringBuffer>();
			for (StringBuffer sbc : cache) {
				if(wbDecoding.get(i) == null){
					System.out.println(i + " is null");
				}
				sbc.append(wbDecoding.get(i).charAt(0));

				if (wbEncoding.get(sbc.toString()) == null) {
					wbEncoding.put(sbc.toString(), nextIndex);
					wbDecoding.put(nextIndex, sbc.toString());

					rm.add(sbc);
					nextIndex++;
				}
			}

			for (StringBuffer rmb : rm) {
				cache.remove(rmb);
			}
			// add current character to cache
			cache.add(new StringBuffer(wbDecoding.get(i)));
		}

		for (Integer in : wbDecoding.keySet()) {
			System.out.println(in + ":" + wbDecoding.get(in));
		}

		return rv.toString();
	}