offset{integer} 开始读取之前要跳过的字节数。必须满足:0 <= offset <= buf.length - 4。默认值:0。- 返回: {integer}
从 buf 中指定的 offset 读取一个无符号大端序的 32 位整数值。
const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);console.log(buf.readUInt32BE(0).toString(16));// 打印: 12345678
offset {integer} 开始读取之前要跳过的字节数。必须满足:0 <= offset <= buf.length - 4。默认值: 0。从 buf 中指定的 offset 读取一个无符号大端序的 32 位整数值。
const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);console.log(buf.readUInt32BE(0).toString(16));// 打印: 12345678
若有收获,就点个赞吧
0 人点赞
让时间为你证明