* Vesa Karvonen: > Take a look at the following code for 32-bit endianness swapping > generated by MLton on x86: I'm sure that nowaydays, you could just use bswapl. It's available in i486 and up, and AFAIK, call compatibles in use today implement it.