Reorder

I am trying to create a file system based on sockets, and because of this, I ran into some problems. I want to read files in chunks using node fs.createReadStream (), but I was unable to resize the block from 665536. I could not find anything about this.

+7
javascript
source share
1 answer

According to the ReadStream code, you can increase highWaterMark by explicitly setting it in the ReadStream parameters:

 var rs = fs.createReadStream('/foo/bar', { highWaterMark: 128 * 1024 }); 
+25
source share

All Articles