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

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

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

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:zlib/Gunzip/wrapMwrap

method

zlib.Gunzip.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 stream

An "old style" readable stream

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

Gunzip.wrap method | Node.js zlib module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    API documentation for method node:zlib.Gunzip.wrap | Bun