public static void ParseBinValues(BinaryReader br, PointData pointData) { // Allocate point data memory pointData.InitPointData(); byte[] bytes = null; // Read values PatchDataIO.ReadArray(br, ref bytes, pointData.lons, 8); PatchDataIO.ReadArray(br, ref bytes, pointData.lats, 8); PatchDataIO.ReadArray(br, ref bytes, pointData.values, 4); // Read distribution values var count = br.ReadByte(); if (count > 0) { int[] distributionValues = new int[count]; PatchDataIO.ReadArray(br, ref bytes, distributionValues, 4); // Read max distribution value int maxDistributionValue = br.ReadInt32(); pointData.SetDistribution(distributionValues, maxDistributionValue); } }