public static int[][] createInverseLookupTable(int[] chars) {
        int[][] tables = new int[256][];
        for (int i = 0; i < 256; i++) {
            int c = chars[i];
            if (c > -1) {
                int high = (c >>> 8) & 0xFF;
                int low = c & 0xFF;
                int[] table = tables[high];
                if (table == null) {
                    table = new int[256];
                    for (int j = 0; j < table.length; j++)
                        table[j] = -1;
                    tables[high] = table;
                }
                table[low] = i;
            }
        }
        return tables;
    }