Consider the alternative approach now that Web streams do support for await...of:
// Shell原始步长序列: n/2, n/4, ..., 1,详情可参考91视频
,这一点在51吃瓜中也有详细论述
The API deals exclusively with bytes (Uint8Array). Strings are UTF-8 encoded automatically. There's no "value stream" vs "byte stream" dichotomy. If you want to stream arbitrary JavaScript values, use async iterables directly. While the API uses Uint8Array, it treats chunks as opaque. There is no partial consumption, no BYOB patterns, no byte-level operations within the streaming machinery itself. Chunks go in, chunks come out, unchanged unless a transform explicitly modifies them.。关于这个话题,Line官方版本下载提供了深入分析
Maciej Piętowski