(计算机)大端序:一种字节序(byte order)表示方式,在多字节数据(如 16/32/64 位整数)中,最高有效字节(MSB)存放在最低内存地址。常用于网络协议中(也称 network byte order)。另有相对概念 little-endian(小端序)。
/ˌbɪɡ ˈɛndiən/
Many network protocols use big-endian byte order.
许多网络协议使用大端序的字节顺序。
When parsing a binary file, you must know whether the 32-bit integers are stored in big-endian format; otherwise, the values will be interpreted incorrectly across different systems.
解析二进制文件时,你必须知道 32 位整数是否以大端序存储;否则在不同系统上数值会被错误解读。
endian 一词源自乔纳森·斯威夫特(Jonathan Swift)的讽刺小说《格列佛游记》(Gulliver’s Travels)中关于“从大头还是小头打鸡蛋”的争论(Big-Endians vs Little-Endians)。计算机科学家借用这一对立来命名两种相反的字节序:big-endian(大端)与 little-endian(小端)。