composeVarArray static method

DC composeVarArray(
  1. List array,
  2. DistributedConnection connection, [
  3. bool prependLength = false
])
Compose an array of variables Variables. DistributedConnection is required to check locality. If True, prepend the length as UInt32 at the beginning of the output.

Implementation

static DC composeVarArray(List array, DistributedConnection connection,
    [bool prependLength = false]) {
  var rt = new BinaryList();

  for (var i = 0; i < array.length; i++)
    rt.addDC(compose(array[i], connection));

  if (prependLength) rt.insertUint32(0, rt.length);

  return rt.toDC();
}