1 2 3 4 5 6 7
var Buffer = require('buffer').Buffer; module.exports = function(buf) { var out = new Buffer(buf.length); buf.copy(out); return out; };