Bufferの連結

こんな感じでいいんだろうか

function concatBuffer(bufs) {
  var len = bufs.reduce(function(a, b) { return a.length + b.length })
    , buf = new Buffer(len)
    , start = 0;

  bufs.forEach(function(chunk) {
    chunk.copy(buf, start, 0);
    start += chunk.length;
  });

  return buf;
}

var buf1 = new Buffer([0xe3, 0x81, 0xbb]);
var buf2 = new Buffer([0xe3, 0x81, 0x92]);
console.log (concatBuffer([buf1, buf2]).toString() ); // => ほげ