scope renderLineCompedSingleLevels. sS renderLineCompedSingleLevels(LineCompedSingle lc) { int n = lcLength(lc); // each byte is the character's "color" // (0 for empty, 1 for color one, 2 for color two) L rows = new AutoGrowingList<>(() -> new byte[n]); fill(lc, rows, 0, 0, lc.main, 1); ret lines(buf); } // returns new x static int #fill(LineCompedSingle lc, L symbols, int color) { for (int idx : symbols) { if (idx < l(lc.literals)) { // nothing to do? ret x+1; } else { int newX = fill(lc, rows, x, y+1, idx, color); while (x < newX) rows.get(y)[x++] = color; color = 3-color; } } ret x; }