DEV Community

Cover image for Day 13 – Buffer & Stream - Learning Node JS In 30 Days [Mini series]
Muhammad Ali (Nerdjfpb)
Muhammad Ali (Nerdjfpb)

Posted on • Originally published at

Day 13 – Buffer & Stream - Learning Node JS In 30 Days [Mini series]

Do you know what is buffer ?

Temporary storage spot for a chunk of data that can be transferred a small amount at a time

Alt Text

Buffer class is a global class that can be accessed in an application without importing the buffer module.

There ares some ways you can call buffer.

Alt Text

Do you now what is stream ?

Streams are objects that let you read data from a source or write data to a destination in continuous fashion.

There are four type of stream in node js
a. Readable − Stream which is used for read operation.
b. Writable − Stream which is used for write operation.
c. Duplex − Stream which can be used for both read and write operation.
d. Transform − A type of duplex stream where the output is computed based on input.

Do you knew this 'Buffer' & 'Stream' before ?

You can see the graphical version here

Originally it published on nerdjfpbblog. You can connect with me in twitter or linkedin !

You can read the old posts from this series (below)

Top comments (0)