温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/zlib/ZstdDecompress/wrap
点击访问原文链接

ZstdDecompress.wrap method | Node.js zlib module | Bun

ZstdDecompress.wrap method | Node.js zlib module | BunBuildDocsReferenceGuidesBlogDiscord/node:zlib/ZstdDecompress/wrapMwrap

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:zlib/ZstdDecompress/wrapMwrap

method

zlib.ZstdDecompress.wrap { myReader.read(); // etc. }); ```" data-algolia-static="false" data-algolia-merged="false" data-type="Method">wrap(stream: ReadableStream): this;Prior to Node.js 0.10, streams did not implement the entire node:stream module API as it is currently defined. (See Compatibility for more information.)

When using an older Node.js library that emits 'data' events and has a pause method that is advisory only, the readable.wrap() method can be used to create a Readable stream that uses the old stream as its data source.

It will rarely be necessary to use readable.wrap() but the method has been provided as a convenience for interacting with older Node.js applications and libraries.

import { OldReader } from './old-api-module.js'; import { Readable } from 'node:stream'; const oreader = new OldReader(); const myReader = new Readable().wrap(oreader); myReader.on('readable', () => { myReader.read(); // etc. }); @param streamAn "old style" readable stream

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco

We're hiring →

智能索引记录