This repository has been archived by the owner on Aug 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some improvement in 3_compress_a_stream
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Compress a stream of data in NodeJS | ||
|
||
A cool thing about Streams is that you can chain them using pipes. This means that you can manipulate the data that is coming in real time. This example shows perfectly how you can compress the content of a file by piping the stream to the zlib lib module before saving it back to disk or passing it to the next pipe. | ||
A cool thing about Streams is that you can chain them using pipes. This means that you can manipulate the data that is coming in real time. This example shows perfectly how you can compress the content of a file by piping the stream to the **zlib** lib module before saving it back to disk or passing it to the next pipe. | ||
|
||
# How to Run the Code | ||
|
||
Simply type the following command in the terminal `node index.js`. | ||
Simply type the following command in the terminal `node index.js`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters