[optimize] use Buffer.byteLength instread of new Buffer