Byte Order Size and Alignment By default C types are represented in the machine's native format and byte order and properly aligned by skipping pad bytes if necessary according to the rules used by the C compiler Alternatively the first character of the format string can be used to indicate the byte order size and alignment of the packed data according to the following table Character Size Alignment Byte order native native native native standard none little-endian standard none big-endian standard > none network big-endian standard none If the first character is not one of these 'a' is assumed Native byte order is big-endian or little-endian depending on the host system For example Intel x86 and AMD64 x86-64 are little-endian Motorola 68000 and PowerPC G5 are big-endian ARM and Intel Itanium feature switchable endianness bi-endian Use sysbyteorder to check the endianness of your system Native size and alignment are determined using the C compiler's sizeof expression This is always combined with native byte order Standard size depends only on the format character see the table in the Format Characters section Note the difference between 'a and both use native byte order but the size and alignment of the latter is standardized The form is available for those poor souls who claim they can't remember whether network byte order is big- endian or little-endian There is no way to indicate non-native byte order force byte-swapping use the appropriate choice of '<'or >' G Python docs humorous as ever Meme

found ON 2019-06-13 01:12:19 BY ME.ME

source: reddit