J
joey.powell
Hello,
I need to be able to read a binary file that contains fields written in
BOTH big endian and little endian byte orders. I am currently unable to
read the big endian fields (erroneous values because of the different
byte orders).
I am currently using FileStream and BinaryReader objects to open and
read the file. As I mentioned above calls to ReadInt32() return
erroneous values becuase of the byte order on the big endian fields.
Is there some sort of "magic" converter, like...
BigEndianToLittleEndian(r.ReadInt32());
that I can use to correctly get at the data?
What is the best method to use to crack this problem?
Thanks in advance.
I need to be able to read a binary file that contains fields written in
BOTH big endian and little endian byte orders. I am currently unable to
read the big endian fields (erroneous values because of the different
byte orders).
I am currently using FileStream and BinaryReader objects to open and
read the file. As I mentioned above calls to ReadInt32() return
erroneous values becuase of the byte order on the big endian fields.
Is there some sort of "magic" converter, like...
BigEndianToLittleEndian(r.ReadInt32());
that I can use to correctly get at the data?
What is the best method to use to crack this problem?
Thanks in advance.