I'm using the fs.createWriteStream(path[, options])
function to create a write stream splitted in text lines each ending with \n
.
But, when the process ended, if I go to check the stream leater it seems to be corrupted, showing some (few) corrupted lines (like a 0.05% of the lines looks partialy cutted like a buffer overflow error).
Anyway if I grow the internal stream buffer from 16k to 4M with the highWaterMark
option at creation of the streem, the error rate seems to change but do not disappear!)