!7 cmodule LiveCompressor { S input, output, prediction; transient new LCStreamingCompressor comp; transient S compressedText; visual centerAndSouth(jvsplit( dm_textAreaAsSection input(), dm_textAreaAsSection output()), dm_labelAsSection prediction()); 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); } compressedText = input; setField(output := lcStream_textWithBrackets(comp)); setField(prediction := lcStream_prediction2(comp)); } }