public static NetworkResponse Parse(MemoryStream dataStream) { ResponsePrediction response = new ResponsePrediction(); response.status = DataReader.ReadShort(dataStream); if (response.status == 0) { Dictionary<int, int> results = new Dictionary<int, int>(); short size = DataReader.ReadShort(dataStream); for (int i = 0; i < size; i++) { int species_id = DataReader.ReadInt(dataStream); int change = DataReader.ReadInt(dataStream); results.Add(species_id, change); } response.results = results; } return response; }