decode static method

Stats? decode(
  1. Unpacker u
)

Implementation

static Stats? decode(Unpacker u) {
  switch (u.unpackListLength()) {
    case 0: return null;
    case 4: break;
    default: throw DecodeError();
  }
  return Stats(
    bytesTx: (u.unpackInt())!,
    bytesRx: (u.unpackInt())!,
    throughputTx: (u.unpackInt())!,
    throughputRx: (u.unpackInt())!,
  );
}