Node.js · 14-day planAll days
Day 8 of 14 30 minBuffersStreamspipeline
Handle data piece by piece instead of all at once. Learn Buffers for binary data and encodings, the four kinds of streams, reading a file line by line, transforming data with pipeline, backpressure, and when streams beat reading whole files.
By the end of today you can
- Create Buffers and convert between text encodings
- Explain why streams use less memory than reading whole files
- Read and write files with streams, and read a file line by line
- Write a Transform stream and connect streams with pipeline
- Describe backpressure and why pipeline handles it
What's inside
- 5 sections
- 3 diagrams and mind maps
- 6 code examples you can run
- 5-question quiz
- 1Buffers: raw bytes
- 2Why streams?
- 3Reading and writing with streams
- 4Transform streams and pipeline
- 5Making a readable stream from data
Sign in free to read this lesson
Get the full lesson with diagrams, runnable code and the quiz. Your progress is saved across devices.
Sign in free