{"id":8575,"date":"2026-03-05T11:47:53","date_gmt":"2026-03-05T11:47:53","guid":{"rendered":"https:\/\/studysection.com\/blog\/?p=8575"},"modified":"2026-03-05T11:47:53","modified_gmt":"2026-03-05T11:47:53","slug":"streams-in-node-js-readable-writable-duplex-transform","status":"publish","type":"post","link":"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/","title":{"rendered":"Streams in Node.js: Readable, Writable, Duplex, Transform"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">When working with Node.js, one of the most powerful features you\u2019ll come across is <\/span><b>streams<\/b><span style=\"font-weight: 400;\">. They help you handle data in chunks instead of loading the entire data into memory at once. This makes them especially useful when working with large files, <a href=\"https:\/\/blog.webnersolutions.com\/wireshark-for-network-traffic-investigation\/\" target=\"_blank\" rel=\"noopener\">network requests<\/a>, or <a href=\"\/blog\/signalr-real-time-web-communication\/\">real-time applications<\/a>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this blog, we\u2019ll break down the four main types of streams in Node.js: <\/span><b>Readable, Writable, Duplex, and Transform<\/b><span style=\"font-weight: 400;\">. Don\u2019t worry\u2014we\u2019ll also see examples to make it simple and clear.<\/span><\/p>\n<h2><b>What are Streams in Node.js?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Streams are like pipelines. Instead of waiting for all the data to be available, you can start processing it as it comes in. Think of watching YouTube: you don\u2019t need to download the full video before watching. Data keeps flowing, and you can use it immediately\u2014that\u2019s how streams work.<\/span><\/p>\n<h2><b>1. Readable Streams<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">A <\/span><b>Readable stream<\/b><span style=\"font-weight: 400;\"> is used to read data. It produces data that can be consumed piece by piece.<\/span><\/p>\n<h4><b>Example: Reading a File<\/b><\/h4>\n<div class=\"\" style=\"background-color: black; color: white; padding: 21px;\">\n<p>const fs = require(&#8216;fs&#8217;);<\/p>\n<p>const readableStream = fs.createReadStream(&#8216;example.txt&#8217;, { encoding: &#8216;utf8&#8217; });<\/p>\n<p>readableStream.on(&#8216;data&#8217;, (chunk) =&gt; {<br \/>\nconsole.log(&#8216;New chunk received:&#8217;, chunk);<br \/>\n});<\/p>\n<p>readableStream.on(&#8216;end&#8217;, () =&gt; {<br \/>\nconsole.log(&#8216;No more data to read.&#8217;);<br \/>\n});<\/p>\n<\/div>\n<p><span style=\"font-weight: 400;\">Here, the file content is read in chunks, not all at once.<\/span><\/p>\n<h2><b>2. Writable Streams<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">A <\/span><b>Writable stream<\/b><span style=\"font-weight: 400;\"> is used to write data. Instead of writing everything in one go, you can write data gradually.<\/span><\/p>\n<h4><b>Example: Writing into a File<\/b><\/h4>\n<div class=\"\" style=\"background-color: black; color: white; padding: 21px;\">\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">const<\/span> <span style=\"font-weight: 400;\">fs<\/span><span style=\"font-weight: 400;\"> = <\/span><span style=\"font-weight: 400;\">require<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;fs&#8217;<\/span><span style=\"font-weight: 400;\">);<\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">const<\/span> <span style=\"font-weight: 400;\">writableStream<\/span><span style=\"font-weight: 400;\"> = <\/span><span style=\"font-weight: 400;\">fs<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">createWriteStream<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;output.txt&#8217;<\/span><span style=\"font-weight: 400;\">);<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">writableStream<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">write<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;Hello, this is the first line.<\/span><span style=\"font-weight: 400;\">\\n<\/span><span style=\"font-weight: 400;\">&#8216;<\/span><span style=\"font-weight: 400;\">);<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">writableStream<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">write<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;And this is the second line.<\/span><span style=\"font-weight: 400;\">\\n<\/span><span style=\"font-weight: 400;\">&#8216;<\/span><span style=\"font-weight: 400;\">);<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">writableStream<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">end<\/span><span style=\"font-weight: 400;\">(() <\/span><span style=\"font-weight: 400;\">=&gt;<\/span><span style=\"font-weight: 400;\"> {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">console<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">log<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;Writing finished.&#8217;<\/span><span style=\"font-weight: 400;\">);<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0});<\/span><\/p>\n<\/div>\n<p><span style=\"font-weight: 400;\">This writes content into a file line by line.<\/span><\/p>\n<h2><b>3. Duplex Streams<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">A <\/span><b>Duplex stream<\/b><span style=\"font-weight: 400;\"> is both <\/span><b>Readable<\/b><span style=\"font-weight: 400;\"> and <\/span><b>Writable<\/b><span style=\"font-weight: 400;\">. It can read and write data at the same time.<\/span><\/p>\n<h4><b>Example: Using a Duplex Stream<\/b><\/h4>\n<div class=\"\" style=\"background-color: black; color: white; padding: 21px;\">\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> { <\/span><span style=\"font-weight: 400;\">Duplex<\/span><span style=\"font-weight: 400;\"> } = <\/span><span style=\"font-weight: 400;\">require<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;stream&#8217;<\/span><span style=\"font-weight: 400;\">);<\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">const<\/span> <span style=\"font-weight: 400;\">duplexStream<\/span><span style=\"font-weight: 400;\"> = <\/span><span style=\"font-weight: 400;\">new<\/span> <span style=\"font-weight: 400;\">Duplex<\/span><span style=\"font-weight: 400;\">({<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">read<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">size<\/span><span style=\"font-weight: 400;\">) {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">this<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">push<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;Hello from Read side!<\/span><span style=\"font-weight: 400;\">\\n<\/span><span style=\"font-weight: 400;\">&#8216;<\/span><span style=\"font-weight: 400;\">);<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">this<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">push<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">null<\/span><span style=\"font-weight: 400;\">); <\/span><span style=\"font-weight: 400;\">\/\/ No more data<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0},<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">write<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">chunk<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">encoding<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">callback<\/span><span style=\"font-weight: 400;\">) {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">console<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">log<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;Writing:&#8217;<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">chunk<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">toString<\/span><span style=\"font-weight: 400;\">());<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">callback<\/span><span style=\"font-weight: 400;\">();<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0}<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0});<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">duplexStream<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">on<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;data&#8217;<\/span><span style=\"font-weight: 400;\">, (<\/span><span style=\"font-weight: 400;\">chunk<\/span><span style=\"font-weight: 400;\">) <\/span><span style=\"font-weight: 400;\">=&gt;<\/span><span style=\"font-weight: 400;\"> {<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">console<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">log<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;Received:&#8217;<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">chunk<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">toString<\/span><span style=\"font-weight: 400;\">());<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0});<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">duplexStream<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">write<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;Message to Duplex Stream&#8217;<\/span><span style=\"font-weight: 400;\">);<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">duplexStream<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">end<\/span><span style=\"font-weight: 400;\">();<\/span><\/p>\n<\/div>\n<p><span style=\"font-weight: 400;\">Here, the same stream can <\/span><b>output data<\/b><span style=\"font-weight: 400;\"> and also <\/span><b>accept data<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h2><b>4. Transform Streams<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">A <\/span><b>Transform stream<\/b><span style=\"font-weight: 400;\"> is a specialized form of Duplex stream.. It can modify the data while reading and writing.<\/span><\/p>\n<h3><b>Example: Converting Text to Uppercase<\/b><\/h3>\n<div class=\"\" style=\"background-color: black; color: white; padding: 21px;\"><span style=\"font-weight: 400;\">\u00a0<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> { <\/span><span style=\"font-weight: 400;\">Transform<\/span><span style=\"font-weight: 400;\"> } = <\/span><span style=\"font-weight: 400;\">require<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;stream&#8217;<\/span><span style=\"font-weight: 400;\">);<\/span><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">const<\/span> <span style=\"font-weight: 400;\">transformStream<\/span><span style=\"font-weight: 400;\"> = <\/span><span style=\"font-weight: 400;\">new<\/span> <span style=\"font-weight: 400;\">Transform<\/span><span style=\"font-weight: 400;\">({<\/span><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">transform<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">chunk<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">encoding<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">callback<\/span><span style=\"font-weight: 400;\">) {<\/span><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">const<\/span> <span style=\"font-weight: 400;\">upperCase<\/span><span style=\"font-weight: 400;\"> = <\/span><span style=\"font-weight: 400;\">chunk<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">toString<\/span><span style=\"font-weight: 400;\">().<\/span><span style=\"font-weight: 400;\">toUpperCase<\/span><span style=\"font-weight: 400;\">();<\/span><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">this<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">push<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">upperCase<\/span><span style=\"font-weight: 400;\">);<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">callback<\/span><span style=\"font-weight: 400;\">();<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0}<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0});<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0<\/span><span style=\"font-weight: 400;\">process<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">stdin<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">pipe<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">transformStream<\/span><span style=\"font-weight: 400;\">).<\/span><span style=\"font-weight: 400;\">pipe<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">process<\/span><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">stdout<\/span><span style=\"font-weight: 400;\">);<\/span><\/p>\n<\/div>\n<p><span style=\"font-weight: 400;\">In this example, when you type something in the terminal, it will be converted to uppercase before being shown.<\/span><\/p>\n<h2><b>Benefit of Streams:<\/b><\/h2>\n<ul style=\"margin-left: 21px;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Memory efficient<\/b><span style=\"font-weight: 400;\">: Data is processed in chunks, not fully loaded.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Faster<\/b><span style=\"font-weight: 400;\">: Start using data as soon as it arrives.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Best for large data<\/b><span style=\"font-weight: 400;\">: File reading, video streaming, logs, etc.<\/span><\/li>\n<\/ul>\n<h2><b>Summary:\u00a0<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Streams in Node.js are like water pipes\u2014you don\u2019t wait for the whole tank to fill before using water. You use it while it\u2019s flowing.<\/span><\/p>\n<ul style=\"margin-left: 21px;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use <\/span><b>Readable<\/b><span style=\"font-weight: 400;\"> to get data.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use <\/span><b>Writable<\/b><span style=\"font-weight: 400;\"> to send data.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use <\/span><b>Duplex<\/b><span style=\"font-weight: 400;\"> for both.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Use <\/span><b>Transform<\/b><span style=\"font-weight: 400;\"> to modify data on the fly.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When working with Node.js, one of the most powerful features you\u2019ll come across is streams. They help you handle data<\/p>\n","protected":false},"author":1,"featured_media":8574,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Streams in Node.js: Readable, Writable, Duplex, Transform<\/title>\n<meta name=\"description\" content=\"Master Node.js streams! Learn how Readable, Writable, Duplex, and Transform streams handle large data efficiently with our simple guide.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Streams in Node.js: Readable, Writable, Duplex, Transform\" \/>\n<meta property=\"og:description\" content=\"Master Node.js streams! Learn how Readable, Writable, Duplex, and Transform streams handle large data efficiently with our simple guide.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Posts on famous people, innovations and educational topics\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/studysection\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-05T11:47:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2026\/03\/Streams-in-Node.js.png\" \/>\n\t<meta property=\"og:image:width\" content=\"940\" \/>\n\t<meta property=\"og:image:height\" content=\"788\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin-studysection-blog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@studysection\" \/>\n<meta name=\"twitter:site\" content=\"@studysection\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin-studysection-blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/\"},\"author\":{\"name\":\"admin-studysection-blog\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402\"},\"headline\":\"Streams in Node.js: Readable, Writable, Duplex, Transform\",\"datePublished\":\"2026-03-05T11:47:53+00:00\",\"dateModified\":\"2026-03-05T11:47:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/\"},\"wordCount\":543,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/studysection.com\/blog\/#organization\"},\"articleSection\":[\"Learn and Grow\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/\",\"url\":\"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/\",\"name\":\"Streams in Node.js: Readable, Writable, Duplex, Transform\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/#website\"},\"datePublished\":\"2026-03-05T11:47:53+00:00\",\"dateModified\":\"2026-03-05T11:47:53+00:00\",\"description\":\"Master Node.js streams! Learn how Readable, Writable, Duplex, and Transform streams handle large data efficiently with our simple guide.\",\"breadcrumb\":{\"@id\":\"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/studysection.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Streams in Node.js: Readable, Writable, Duplex, Transform\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/studysection.com\/blog\/#website\",\"url\":\"https:\/\/studysection.com\/blog\/\",\"name\":\"Blog Posts on famous people, innovations and educational topics\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/studysection.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/studysection.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/studysection.com\/blog\/#organization\",\"name\":\"StudySection\",\"url\":\"https:\/\/studysection.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png\",\"contentUrl\":\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png\",\"width\":920,\"height\":440,\"caption\":\"StudySection\"},\"image\":{\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/studysection\",\"https:\/\/twitter.com\/studysection\",\"https:\/\/www.instagram.com\/study.section\/\",\"https:\/\/www.linkedin.com\/company\/studysection\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402\",\"name\":\"admin-studysection-blog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g\",\"caption\":\"admin-studysection-blog\"},\"url\":\"https:\/\/studysection.com\/blog\/author\/admin-studysection-blog\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Streams in Node.js: Readable, Writable, Duplex, Transform","description":"Master Node.js streams! Learn how Readable, Writable, Duplex, and Transform streams handle large data efficiently with our simple guide.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/","og_locale":"en_US","og_type":"article","og_title":"Streams in Node.js: Readable, Writable, Duplex, Transform","og_description":"Master Node.js streams! Learn how Readable, Writable, Duplex, and Transform streams handle large data efficiently with our simple guide.","og_url":"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/","og_site_name":"Blog Posts on famous people, innovations and educational topics","article_publisher":"https:\/\/www.facebook.com\/studysection","article_published_time":"2026-03-05T11:47:53+00:00","og_image":[{"width":940,"height":788,"url":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2026\/03\/Streams-in-Node.js.png","type":"image\/png"}],"author":"admin-studysection-blog","twitter_card":"summary_large_image","twitter_creator":"@studysection","twitter_site":"@studysection","twitter_misc":{"Written by":"admin-studysection-blog","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/#article","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/"},"author":{"name":"admin-studysection-blog","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402"},"headline":"Streams in Node.js: Readable, Writable, Duplex, Transform","datePublished":"2026-03-05T11:47:53+00:00","dateModified":"2026-03-05T11:47:53+00:00","mainEntityOfPage":{"@id":"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/"},"wordCount":543,"commentCount":0,"publisher":{"@id":"https:\/\/studysection.com\/blog\/#organization"},"articleSection":["Learn and Grow"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/","url":"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/","name":"Streams in Node.js: Readable, Writable, Duplex, Transform","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/#website"},"datePublished":"2026-03-05T11:47:53+00:00","dateModified":"2026-03-05T11:47:53+00:00","description":"Master Node.js streams! Learn how Readable, Writable, Duplex, and Transform streams handle large data efficiently with our simple guide.","breadcrumb":{"@id":"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/studysection.com\/blog\/streams-in-node-js-readable-writable-duplex-transform\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/studysection.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Streams in Node.js: Readable, Writable, Duplex, Transform"}]},{"@type":"WebSite","@id":"https:\/\/studysection.com\/blog\/#website","url":"https:\/\/studysection.com\/blog\/","name":"Blog Posts on famous people, innovations and educational topics","description":"","publisher":{"@id":"https:\/\/studysection.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/studysection.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/studysection.com\/blog\/#organization","name":"StudySection","url":"https:\/\/studysection.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png","contentUrl":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png","width":920,"height":440,"caption":"StudySection"},"image":{"@id":"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/studysection","https:\/\/twitter.com\/studysection","https:\/\/www.instagram.com\/study.section\/","https:\/\/www.linkedin.com\/company\/studysection"]},{"@type":"Person","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402","name":"admin-studysection-blog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g","caption":"admin-studysection-blog"},"url":"https:\/\/studysection.com\/blog\/author\/admin-studysection-blog\/"}]}},"views":55,"_links":{"self":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/8575"}],"collection":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/comments?post=8575"}],"version-history":[{"count":16,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/8575\/revisions"}],"predecessor-version":[{"id":8591,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/8575\/revisions\/8591"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media\/8574"}],"wp:attachment":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media?parent=8575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/categories?post=8575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/tags?post=8575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}