What is the basic difference between these two operations ?
someReadStream.pipe(fs.createWriteStream('foo.png'));
vs
someReadStream.on('data', function(chunk) { blob += chunk } );
someReadStream.on('end', function() { fs.writeFile('foo.png', blob) });
When using request library for scraping, I can save pics (png, bmp) etc.. only with the former method and with the latter one there is same gibbersh (binary) data but image doesn't render.
How are they different ?