JavaScript Endian编码? [英] JavaScript Endian Encoding?

查看:178
本文介绍了JavaScript Endian编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对SO的回复得到我想,JavaScript是否保证跨操作系统和浏览器的一些端序编码?

A response on SO got me thinking, does JavaScript guarantee a certain endian encoding across OSs and browsers?

或者另一种方式是在JavaScript中整数的按位移位?

Or put another way are bitwise shifts on integers "safe" in JavaScript?

推荐答案

是的,他们是安全的。虽然您没有获得速度优势,但您可能希望,因为JS位操作是 a hack

Yes, they are safe. Although you're not getting the speed benefits you might hope for since JS bit operations are "a hack".

这篇关于JavaScript Endian编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆