static List<int> encodeBytes(List<int> b) { var bytes = Uint8List.fromList(b); var val = <int>[]; val.addAll(encodeUInt32(bytes.length)); val.addAll(bytes); return val; }