Faster (unsafe) BinaryReader in .NET

后端 未结 4 1674
余生分开走
余生分开走 2021-01-31 18:06

I came across a situation where I have a pretty big file that I need to read binary data from.

Consequently, I realized that the default BinaryReader implementation in .

4条回答
  •  一个人的身影
    2021-01-31 18:50

    One caveat; you might want to double-check your CPU's endianness... assuming little-endian is not quite safe (think: itanium etc).

    You might also want to see if BufferedStream makes any difference (I'm not sure it will).

提交回复
热议问题