!7 cmodule LiveCompressor { S input, output; transient new LCStreamingCompressor comp; transient S compressedText; visual vstackWithSpacing( dm_textFieldWithSection input(), dm_labelAsSection output()); start { dm_onFieldChangeAndNow input(r calc); } void calc { S input = this.input; new Matches m; if (startsWith(input, compressedText, m)) comp.append(m.rest()); else { comp = new LCStreamingCompressor; comp.append(input); } setField(output := print(lcStream_textWithBrackets(comp)); } }