none
[HELP] Big Endian to Little Endian RRS feed

Answers

  • You can use the same code to convert in both directions.

    But you know you have to know the file format before doing this? Not just reverse the order of every 4 bytes. In addition there can be 16 and 64 bit data types (both also supported by the BitConverter). I don't know if xbox and pc save files are compatible apart from the endian.

    For bigger files, Bitconverter is possibly not the fastest solution; but it works.


    Armin

    Wednesday, September 11, 2013 2:39 PM

All replies

  • Don't we all end little? ;) Ummm...sorry.... What kind of file is it? Of course you can read, change byte order, write. Example:

          Dim i As Integer
          Dim b As Byte()
    
          b = BitConverter.GetBytes(i)
          Array.Reverse(b)
          i = BitConverter.ToInt32(b, 0)
    


    Armin

    Wednesday, September 11, 2013 2:17 PM
  • Im gonna try.

    And to convert again Little Endian to Big Endian?

    Is to convert pes xbox save file to pc save file.

    • Edited by extream87 Wednesday, September 11, 2013 2:25 PM
    Wednesday, September 11, 2013 2:24 PM
  • You can use the same code to convert in both directions.

    But you know you have to know the file format before doing this? Not just reverse the order of every 4 bytes. In addition there can be 16 and 64 bit data types (both also supported by the BitConverter). I don't know if xbox and pc save files are compatible apart from the endian.

    For bigger files, Bitconverter is possibly not the fastest solution; but it works.


    Armin

    Wednesday, September 11, 2013 2:39 PM
  • What kind of file?  There are methods for converting text files but you'll have to convert binary files object by object.
    Wednesday, September 11, 2013 4:04 PM
  • From the text at www.pes-patch.com/2012/10/pes-2013-multiconverter-by-starvin-and-smeagol75.html, it looks like the pes (Pro Evolution Soccer) file might be compressed, so you would have to decompress it first.

    --
    Andrew

    Wednesday, September 11, 2013 6:24 PM