Why is stream.pipeline() preferred over stream.pipe()?
- A It is faster
- B It forwards errors and cleans up all streams when one fails
- C It supports more stream types
- D It compresses data automatically
Answer
It forwards errors and cleans up all streams when one fails
pipe does not propagate errors or destroy the remaining streams, which leaks file descriptors. pipeline handles both.





