decodeOpStream function
Decodes deltas as they arrive (OpStreamDecoder): every op as soon as
it is complete. The stream's problems are not reported here: use the
decoder for OpStreamEnd.
Implementation
Stream<StreamedOp> decodeOpStream(Stream<String> deltas, {bool partialSets = true}) async* {
final d = OpStreamDecoder(partialSets: partialSets);
await for (final delta in deltas) {
yield* Stream.fromIterable(d.add(delta));
}
d.close();
}