Loading
A way to read or write data piece by piece instead of all at once — like drinking from a water fountain instead of waiting for a bucket to fill.
An abstract interface for working with flowing data. Node.js provides four stream types: Readable, Writable, Duplex, and Transform. Streams process data in chunks, enabling memory-efficient handling of large files and network data.
Node.js streams implement backpressure via the highWaterMark and the writable.write() return value. When the consumer is slower than the producer, the Readable pauses (flowing → paused mode). The stream.pipeline() utility handles error propagation and cleanup across a chain of streams. Node 16+ supports the Web Streams API (ReadableStream, WritableStream, TransformStream) alongside the Node-native stream module.