buf.writeDoubleBE()函数详解
buf.writeDoubleBE(value, offset[, noAssert])
buf.writeDoubleLE(value, offset[, noAssert])
- value {Number} 需要被写入到 Buffer 的字节+
- offset {Number} 0 <= offset <= buf.length - 8
- noAssert {Boolean} 默认:false
- 返回:{Number} 偏移加上被写入的字节数
console.log(buf);
// Prints: <Buffer 43 eb d5 b7 dd f9 5f d7>
buf.writeDoubleLE(0xdeadbeefcafebabe, 0);
console.log(buf);
// Prints: <Buffer d7 5f f9 dd b7 d5 eb 43>