const fs = require('fs')


let rs = fs.createReadStream('./data1.txt')

let ws = fs.createWriteStream('data2.txt')


// 绑定 data 事件

rs.on('data',chunk=>{

    ws.write(chunk)     // 写入读出的chunk 文件块

})