node.js Duplex流与Transform 流

Use-case

Class

Method(s) to implement

Reading only

Readable

_read

Writing only

Writable

_write

Reading and writing

Duplex

_read_write

Operate on written data, then read the result

Transform

_transform_flush



通过查node.js 官方API 了解到:

Duplex 流 只设计到读写动作,

而Transform 流,读入数据->操作数据_>写出结果。

你可能感兴趣的:(Node.js笔记)