buf.writeUInt32BE()
buf.writeUInt32BE(value, offset[, noAssert])
buf.writeUInt32LE(value, offset[, noAssert])
- value {Number} 需要被写入到 Buffer 的字节
- offset {Number} 0 <= offset <= buf.length - 4
- noAssert {Boolean} 默认:false
- 返回:{Number} 偏移加上被写入的字节数
console.log(buf);
// Prints:
buf.writeUInt32LE(0xfeedface, 0);
console.log(buf);
// Prints: