스트림으로 읽어오는 놈을 찾다 보니 이런게 있는데..
희한하게(?) 너무 뜨문뜨문 읽어서 확인해보니
한번에 읽어오는 용량을 설정할수 있고 기본 값은 64kb 라고.. (kB가 아니라?)
Unlike the 16 kb default highWaterMark for a readable stream, the stream returned by this method has a default highWaterMark of 64 kb. options can include start and end values to read a range of bytes from the file instead of the entire file. Both start and end are inclusive and start counting at 0, allowed values are in the [0, Number.MAX_SAFE_INTEGER] range. If fd is specified and start is omitted or undefined, fs.createReadStream() reads sequentially from the current file position. The encoding can be any one of those accepted by Buffer. |
[링크 : https://nodejs.org/api/fs.html#fs_fs_createreadstream_path_options]
[링크 : https://stackoverflow.com/questions/24005496/nodejs-copying-file-over-a-stream-is-very-slow]
'Programming > node.js' 카테고리의 다른 글
node.js readline() (0) | 2019.06.28 |
---|---|
node.js 메모리 사용 가능 용량 늘리기 (0) | 2019.06.21 |
node.js xml2js (0) | 2019.06.19 |
node.js Javascript heap out of memory (0) | 2019.06.19 |
node.js 용량 제한(?) (0) | 2019.06.18 |