forEachSegment method
Calls f for each segment as (buffer, offset, length).
This is the lowest-allocation way to consume a borrowed view.
Implementation
void forEachSegment(void Function(Uint8List buf, int offset, int length) f) {
_ensureValid();
final n1 = _len1;
if (n1 != 0) f(_buf1, _off1, n1);
final n2 = _len2;
if (n2 != 0) f(_buf2, _off2, n2);
}