Any way to read big endian data with little endian program?

前端 未结 8 1771
走了就别回头了
走了就别回头了 2021-01-13 13:50

An external group provides me with a file written on a Big Endian machine, and they also provide a C++ parser for the file format.

I only can run the parser on a lit

8条回答
  •  余生分开走
    2021-01-13 14:19

    In general, there's no "easy" solution to this. You will have to modify the parser to swap the bytes of each and every integer read from the file.

提交回复
热议问题