static LineCompReader lcMerge(LineCompReader lc1, LineCompReader lc2) { Map pairIndex = indexList(lc1.pairs); Map literalIndex = indexList(lc1.literals); new LineCompReader lcOut; // process literals lcOut.literals = cloneList(lc1.literals); for (int i = 0; i < l(lc2.literals); i++) { char c = lc2.literals.get(i); Int iLit = literalIndex.get(c); if (iLit == 0) literalIndex.put(c, addAndReturnIndex(lcOut.literals, c)); } ret lcOut; }