Core ModulesLesson 28Free preview
Stream Module
This lesson is part of Node.js · All levels
Summary
Stream allows data to be processed partially so that large files or network data do not need to be loaded entirely into memory. The node provides four types of streams: Readable, Writable, Duplex, and Transform. This concept is the backbone of file operations, HTTP, and interprocess communication.
Key points
- There are four types of streams: Readable, Writable, Duplex, and Transform
- The stream works with the chunk mechanism so it saves memory
- Pipe (stream.pipe) connects the output of one stream to the input stream of another
- Key event: data, end, error, and finish
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.