rawBlocks property
Low-level per-block view for codecs: (start, parent, side, values, deletedRanges), where deletedRanges is a flat [start, len, …] list.
The values list must not be mutated.
Implementation
Iterable<(Dot, Dot, Side, List<T>, List<int>)> get rawBlocks sync* {
// Start-dot order so consumers (e.g. the binary codec) emit canonical,
// insertion-order-independent bytes.
final ordered = _blocks.values.toList()
..sort((x, y) => x.start.compareTo(y.start));
for (final b in ordered) {
yield (b.start, b.parent, b.side, b.values, _encodeDeleted(b.deleted));
}
}