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

Bun ArrayBufferSink class | API Reference | Bun

Bun ArrayBufferSink class | API Reference | BunBuildDocsReferenceGuidesBlogDiscord/Bun/ArrayBufferSinkCoconstructorMendMflushMstartMwrite

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/Bun/ArrayBufferSinkCoconstructorMendMflushMstartMwrite

class

ArrayBufferSinkclass ArrayBufferSink

Fast incremental writer that becomes an ArrayBuffer on end().

end(): ArrayBuffer | Uint8ArrayArrayBuffer>;flush(): number | ArrayBuffer | Uint8ArrayArrayBuffer>;

Flush the internal buffer

If ArrayBufferSink.start was passed a stream option, this will return a ArrayBuffer If ArrayBufferSink.start was passed a stream option and asUint8Array, this will return a Uint8Array Otherwise, this will return the number of bytes written since the last flush

This API might change later to separate Uint8ArraySink and ArrayBufferSink

start(options?: { asUint8Array: boolean; highWaterMark: number; stream: boolean }): void;write(chunk: string | ArrayBuffer | SharedArrayBuffer | ArrayBufferViewArrayBufferLike>): number;

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 →

Bun ArrayBufferSink class | API Reference | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    Fast incremental writer that becomes an ArrayBuffer on end().