Adds recognition and handling of little or big endian.