We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
一个TypedArray 对象描述一个底层的二进制数据缓存区的一个类似数组(array-like)视图 JavaScript的TypedArray分为两个部分:缓冲区和视图
ArrayBufferView的子类: 下面的子类提供了特定的缓冲区视图,用来处理不同类型的数据。要注意的是,如果要处理的数据类型超过一字节,将使用平台对应的端序。如果需要操作端序,可以使用DataView来代替ArrayBufferView。 Int8Array 、Uint8Array、Int16Array、Uint16Array、Int32Array、Uint32Array、Float32Array、Float64Array
ArrayBufferView的父类:
操作更复杂的数据结构
var buffer = new ArrayBuffer(24); var idView = new Uint32Array(buffer, 0, 1); var usernameView = new Uint8Array(buffer, 4, 16); var amountDueView = new Float32Array(buffer, 20, 1);
转换成普通的数组
var typedArray = new Uint8Array( [ 1, 2, 3, 4 ] ), normalArray = Array.apply( [], typedArray ); normalArray.length === 4; normalArray.constructor === Array;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
一个TypedArray 对象描述一个底层的二进制数据缓存区的一个类似数组(array-like)视图
JavaScript的TypedArray分为两个部分:缓冲区和视图
ArrayBufferView的子类:
下面的子类提供了特定的缓冲区视图,用来处理不同类型的数据。要注意的是,如果要处理的数据类型超过一字节,将使用平台对应的端序。如果需要操作端序,可以使用DataView来代替ArrayBufferView。
Int8Array 、Uint8Array、Int16Array、Uint16Array、Int32Array、Uint32Array、Float32Array、Float64Array
ArrayBufferView的父类:
操作更复杂的数据结构
转换成普通的数组
The text was updated successfully, but these errors were encountered: