writeWritables method

int writeWritables(
  1. Iterable<Writable> list, {
  2. bool leb128 = false,
})

Writes a list of Writable.

Implementation

int writeWritables(Iterable<Writable> list, {bool leb128 = false}) {
  var length = list.length;

  bytesIO.ensureCapacity(position + 4 + (length * 8));

  int sz;
  if (leb128) {
    sz = writeLeb128UnsignedInt(length);
  } else {
    sz = writeUint32(length);
  }

  for (var e in list) {
    sz += e.writeTo(this);
  }

  return sz;
}