writeLeb128Block method

void writeLeb128Block(
  1. List<List<int>> block, {
  2. String? description,
})

Writes a Leb128 block to this bytes instance.

Implementation

void writeLeb128Block(List<List<int>> block, {String? description}) {
  var blockSize = Leb128.encodeUnsigned(block.expandedLength);
  _data.add(BytesEmitter(data: blockSize, description: "Bytes block length"));

  if (description != null) {
    _data.add(BytesEmitter(data: block, description: description));
  } else {
    writeAll(block);
  }
}