标签:number ber console 大小 包含 构建 获得 加速计 length
Buffer.concat(list[, totalLength])
const buf1 = Buffer.alloc(10, 0);
const buf2 = Buffer.alloc(14, 0);
const buf3 = Buffer.alloc(18, 0);
const totalLength = buf1.length + buf2.length + buf3.length;
console.log(totalLength);
const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
console.log(bufA);
console.log(bufA.length);
// 42
// <Buffer 00 00 00 00 ... >
// 42
标签:number ber console 大小 包含 构建 获得 加速计 length
原文地址:https://www.cnblogs.com/lalalagq/p/9908505.html