iOS.big-endian

1. iOS/MacOS中判断big-endian/little-endian

Xcode的文档

Byte-Order Utilities Reference

"A platform stores values either in big-endian or little-endian format. On big-endian machines,

such as PowerPC machines, values are stored with the most-significant bytes first in memory;

on little-endian machines, such as Pentium machines, values are stored with the least-significant bytes first."

CFByteOrderGetCurrent()

2. big-endian/little-endian分别指的什么?

http://www.webopedia.com/TERM/B/big_endian.html

3. 关于字节序

http://zh.wikipedia.org/wiki/字节序

网络字节序: TCP/IP协议要求 TCP/IP中的字段要使用 大端序(big-endian), 即Ip addres,port等需要使用大端序,

这种字节序称为网络字节序。但是TCP中数据包中采用哪种字节序完全有程序设计人员决定。

你可能感兴趣的:(ios)