short[,] out2 = new short[1201, 1201];
FileStream fs = new FileStream(Application.StartupPath + "\\One_File\\result.hgt",
FileMode.OpenOrCreate,
FileAccess.Write);
BinaryWriter bw = new BinaryWriter(fs);
for (int i = 0; i < 1201; i++)
{
for (int j = 0; j < 1201; j++)
{
bw.Write(out2[i, j]);
}
}
1201 * 1201 * 2 = 2 884 802字节。
结果文件的大小为 2 883 584字节。
为什么?