Endianness generally is fast to convert, just pick a standard for the file format and detect on the platform.  You can convert endianness with just shifts in C if you need to or with assembly instructions that I believe are one tick on most platforms.  It is much much faster to convert endianness (again at least 10x faster) than to parse text.<p>It looks like you can just use these functions to convert between endianness conditionally based on the platform if you are in C&#x2F;C++:<p><a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;8671129" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;8671129</a><p>And boost has one here: <a href="http:&#x2F;&#x2F;www.boost.org&#x2F;doc&#x2F;libs&#x2F;1_58_0&#x2F;libs&#x2F;endian&#x2F;doc&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;www.boost.org&#x2F;doc&#x2F;libs&#x2F;1_58_0&#x2F;libs&#x2F;endian&#x2F;doc&#x2F;index.h...</a>