@@ -81,12 +81,12 @@ To test the results, try opening each compressed file. The file compressed by
81
81
the [ ` zip(1) ` ] [ ] tool will notify you the file is corrupt, whereas the
82
82
compression finished by [ ` Stream ` ] [ ] will decompress without error.
83
83
84
- Note: In this example, we use ` .pipe() ` to get the data source from one end
85
- to the other. However, notice there are no proper error handlers attached. If
86
- a chunk of data were to fail to be properly received, the ` Readable ` source or
87
- ` gzip ` stream will not be destroyed. [ ` pump ` ] [ ] is a utility tool that would
88
- properly destroy all the streams in a pipeline if one of them fails or closes,
89
- and is a must have in this case!
84
+ > ** Note:** In this example, we use ` .pipe() ` to get the data source from one end
85
+ > to the other. However, notice there are no proper error handlers attached. If
86
+ > a chunk of data were to fail to be properly received, the ` Readable ` source or
87
+ > ` gzip ` stream will not be destroyed. [ ` pump ` ] [ ] is a utility tool that would
88
+ > properly destroy all the streams in a pipeline if one of them fails or closes,
89
+ > and is a must have in this case!
90
90
91
91
[ ` pump ` ] [ ] is only necessary for Node.js 8.x or earlier, as for Node.js 10.x
92
92
or later version, [ ` pipeline ` ] [ ] is introduced to replace for [ ` pump ` ] [ ] .
@@ -354,11 +354,11 @@ Well the answer is simple: Node.js does all of this automatically for you.
354
354
That's so great! But also not so great when we are trying to understand how to
355
355
implement our own custom streams.
356
356
357
- Note: In most machines, there is a byte size that determines when a buffer
358
- is full (which will vary across different machines). Node.js allows you to set
359
- your own custom [ ` highWaterMark ` ] [ ] , but commonly, the default is set to 16kb
360
- (16384, or 16 for objectMode streams). In instances where you might
361
- want to raise that value, go for it, but do so with caution!
357
+ > ** Note:** In most machines, there is a byte size that determines when a buffer
358
+ > is full (which will vary across different machines). Node.js allows you to set
359
+ > your own custom [ ` highWaterMark ` ] [ ] , but commonly, the default is set to 16kb
360
+ > (16384, or 16 for objectMode streams). In instances where you might
361
+ > want to raise that value, go for it, but do so with caution!
362
362
363
363
## Lifecycle of ` .pipe() `
364
364
@@ -410,9 +410,9 @@ stream:
410
410
+============+
411
411
```
412
412
413
- Note: If you are setting up a pipeline to chain together a few streams to
414
- manipulate your data, you will most likely be implementing [ ` Transform ` ] [ ]
415
- stream.
413
+ > ** Note:** If you are setting up a pipeline to chain together a few streams to
414
+ > manipulate your data, you will most likely be implementing [ ` Transform ` ] [ ]
415
+ > stream.
416
416
417
417
In this case, your output from your [ ` Readable ` ] [ ] stream will enter in the
418
418
[ ` Transform ` ] [ ] and will pipe into the [ ` Writable ` ] [ ] .
@@ -450,11 +450,11 @@ In general,
450
450
3 . Streams changes between different Node.js versions, and the library you use.
451
451
Be careful and test things.
452
452
453
- Note: In regards to point 3, an incredibly useful package for building
454
- browser streams is [ ` readable-stream ` ] [ ] . Rodd Vagg has written a
455
- [ great blog post] [ ] describing the utility of this library. In short, it
456
- provides a type of automated graceful degradation for [ ` Readable ` ] [ ] streams,
457
- and supports older versions of browsers and Node.js.
453
+ > ** Note:** In regards to point 3, an incredibly useful package for building
454
+ > browser streams is [ ` readable-stream ` ] [ ] . Rodd Vagg has written a
455
+ > [ great blog post] [ ] describing the utility of this library. In short, it
456
+ > provides a type of automated graceful degradation for [ ` Readable ` ] [ ] streams,
457
+ > and supports older versions of browsers and Node.js.
458
458
459
459
## Rules specific to Readable Streams
460
460
0 commit comments