jeevan-vaishnav / Streams

Node.JS Core Concepts
1 stars 0 forks source link

Streams #1

Open jeevan-vaishnav opened 1 week ago

jeevan-vaishnav commented 1 week ago
jeevan-vaishnav commented 1 week ago

Stream : an abstract interface for working with streaming data in Node.js

Streaming Data ?

Data flowing

jeevan-vaishnav commented 1 week ago

image

jeevan-vaishnav commented 1 week ago

We have a Internal Buffer 16384 bytes, also we have events, properties and methods available, also we have important stream.write(data) and to your internal buffer (300 Bytes)

image .

jeevan-vaishnav commented 2 days ago

readable.pipe(destination[, options])# Added in: v0.9.4 destination The destination for writing data options Pipe options end End the writer when the reader ends. Default: true. Returns: The destination, allowing for a chain of pipes if it is a Duplex or a Transform stream The readable.pipe() method attaches a Writable stream to the readable, causing it to switch automatically into flowing mode and push all of its data to the attached Writable. The flow of data will be automatically managed so that the destination Writable stream is not overwhelmed by a faster Readable stream.