C# – Binary reader in Big Endian?
I’m not usually one to answer my own questions, but I’ve accomplished exactly what I wanted with some simple code: class BinaryReader2 : BinaryReader { public BinaryReader2(System.IO.Stream stream) : base(stream) { } public override int ReadInt32() { var data = base.ReadBytes(4); Array.Reverse(data); return BitConverter.ToInt32(data, 0); } public Int16 ReadInt16() { var data = base.ReadBytes(2); Array.Reverse(data); … Read more