writeLeb128BlockFrom method

int writeLeb128BlockFrom(
  1. BytesBuffer src, [
  2. int? length
])

Writes a LEB128 bytes block from src.

Implementation

int writeLeb128BlockFrom(BytesBuffer src, [int? length]) {
  length ??= src.length;
  var bsLng = Leb128.encodeUnsigned(length);
  writeAllBytes(bsLng);
  return writeFrom(src, length) + bsLng.length;
}