2021年12月28日

How to test your code on a machine with big-endian architecture 如何在大端机器上测试你的代码

摘要: How to test your code on a machine with big-endian architecture sudo apt-get install gcc-multilib-mips-linux-gnu gcc-mips-linux-gnu qemu-user sudo apt 阅读全文

posted @ 2021-12-28 21:30 明天有风吹 阅读(23) 评论(0) 推荐(0) 编辑

python struct.pack('5sI', b'abc\x00', 1) 字节顺序,大小和对齐方式

摘要: 今天在 python 里面手动构造 C 的 struct 时,惊奇的发现 struct.pack('5sI', b'abc\x00', 1) 返回结果的长度是 12 ! 而 struct.pack('5s') + struct.pack('I', 1) 跟预想结果一致,是 9 看文档: 字节顺序,大 阅读全文

posted @ 2021-12-28 21:03 明天有风吹 阅读(467) 评论(0) 推荐(0) 编辑

导航

+V atob('d2h5X251bGw=')

请备注:from博客园