const arrayBuffer= new ArrayBuffer(str.length)
const bufferView = new Uint8Array(ab)
for (let i = 0; i < str.length; i++) {
bufferView[i] = str.charCodeAt(i)
}
04-21
1104
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-07
const arrayBuffer= new ArrayBuffer(str.length)
const bufferView = new Uint8Array(ab)
for (let i = 0; i < str.length; i++) {
bufferView[i] = str.charCodeAt(i)
}