List<double?> readFloatArray() { var l = readInt(); var result = List<double?>.filled(l, null, growable: false); for (int i = 0; i < l; i++) { result[i] = readFloat(); } return result; }