Skip to content

回复:大端序代码问题 ​

原始发布页

打开来源页面
查看 1 个交叉存档

代码从头到尾都假定使用小端序,编写时就没打算移植到大端序。除了代码中其他几十处之外,每个通过网络发送的整数都必须进行字节交换。不值得为此让源代码额外膨胀。

反正大端序也正在被淘汰。

英文原文 ​

展开英文原文

The code assumes little-endian throughout and was written with the intention of never being ported to big-endian. Every integer that is sent over the network would have to be byte swapped, in addition to many dozens of other places in code. It would not be worth the extra sourcecode bloat.

Big-endian is on its way out anyway.

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。