private final String[] encodeFilter(final Short[] cbf) {
		ArrayList<String> ccbf = new ArrayList<String>();
		// find best compression rate by iteratively filling whole word
		String word = new String();
		int ncells = 0; 
		int i = 0;
		// sth wrong here when working with pruned tables.
		while (i<cbf.length) {
			String code = huff.getCode(cbf[i++]);
			if (ncells<rate) {
				word += code;
				ncells++;
				if (word.length()>maxlen) {
					ccbf.clear();
					word = "";
					ncells = 0;
					rate--;
					i = 0;
				}
			} else {
				// whats with the last counters / word?
				ccbf.add(word);
				word = code;
				ncells = 1;
			}
		}
		return ccbf.toArray(new String[ccbf.size()]);
	}