Different types of streams

There are four classes of streams:

Readable: a stream you can pipe from, but not pipe into (you can receive data, but not send data to it). When you push data into a readable stream, it is buffered, until a consumer starts to read the data.

Writable: a stream you can pipe into, but not pipe from (you can send data, but not receive from it)

Duplex: a stream you can both pipe into and pipe from, basically a combination of a Readable and Writable stream

Transform: a Transform stream is similar to a Duplex, but the output is a transform of its input

How to create a readable stream

We get the Readable stream from the stream module, and we initialize it