Default byte order of QDataStream

233 Views Asked by At

Default byte order of QDataStream is BigEndian, according to its documentation. AFAIK this means that written data on a little-endian platform is converted from little to big and read data is converted from big to little.

Most platforms supported by Qt, especially x86/x64, are little-endian. This link states Qt's CI doesn't even include any big-endian devices. This would mean that the default configuration of QDataStream requires lots of endianness conversions on Qt's major platforms - which would be pretty sub-optimal.

Did I miss something obvious? If not, why didn't Qt use LittleEndian as a default to support major platforms more efficiently?

0

There are 0 best solutions below