Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/node:zlib/ZstdDecompress/writeMwritemethod
zlib.ZstdDecompress.write { console.log('Write completed, do more writes now.'); }); ``` A `Writable` stream in object mode will always ignore the `encoding` argument." data-algolia-static="false" data-algolia-merged="false" data-type="Method">write(chunk: any,callback?: (error: undefined | null | Error) => void): boolean;The writable.write() method writes some data to the stream, and calls the supplied callback once the data has been fully handled. If an error occurs, the callback will be called with the error as its first argument. The callback is called asynchronously and before 'error' is emitted.The return value is true if the internal buffer is less than the highWaterMark configured when the stream was created after admitting chunk. If false is returned, further attempts to write data to the stream should stop until the 'drain' event is emitted.While a stream is not draining, calls to write() will buffer chunk, and return false. Once all currently buffered chunks are drained (accepted for delivery by the operating system), the 'drain' event will be emitted. Once write() returns false, do not write more chunks until the 'drain' event is emitted. While calling write() on a stream that is not draining is allowed, Node.js will buffer all written chunks until maximum memory usage occurs, at which point it will abort unconditionally. Even before it aborts, high memory usage will cause poor garbage collector performance and high RSS (which is not typically released back to the system, even after the memory is no longer required). Since TCP sockets may never drain if the remote peer does not read the data, writing a socket that is not draining may lead to a remotely exploitable vulnerability.Writing data while the stream is not draining is particularly problematic for a Transform, because the Transform streams are paused by default until they are piped or a 'data' or 'readable' event handler is added.If the data to be written can be generated or fetched on demand, it is recommended to encapsulate the logic into a Readable and use pipe. However, if calling write() is preferred, it is possible to respect backpressure and avoid memory issues using the 'drain' event:function write(data, cb) { if (!stream.write(data)) { stream.once('drain', cb); } else { process.nextTick(cb); } } // Wait for cb to be called before doing any other write. write('hello', () => { console.log('Write completed, do more writes now.'); }); A Writable stream in object mode will always ignore the encoding argument.@param chunkOptional data to write. For streams not operating in object mode, chunk must be a {string}, {Buffer}, {TypedArray} or {DataView}. For object mode streams, chunk may be any JavaScript value other than null.@param callbackCallback for when this chunk of data is flushed.@returnsfalse if the stream wishes for the calling code to wait for the 'drain' event to be emitted before continuing to write additional data; otherwise true.write(chunk: any,encoding: BufferEncoding,callback?: (error: undefined | null | Error) => void): boolean;The writable.write() method writes some data to the stream, and calls the supplied callback once the data has been fully handled. If an error occurs, the callback will be called with the error as its first argument. The callback is called asynchronously and before 'error' is emitted.The return value is true if the internal buffer is less than the highWaterMark configured when the stream was created after admitting chunk. If false is returned, further attempts to write data to the stream should stop until the 'drain' event is emitted.While a stream is not draining, calls to write() will buffer chunk, and return false. Once all currently buffered chunks are drained (accepted for delivery by the operating system), the 'drain' event will be emitted. Once write() returns false, do not write more chunks until the 'drain' event is emitted. While calling write() on a stream that is not draining is allowed, Node.js will buffer all written chunks until maximum memory usage occurs, at which point it will abort unconditionally. Even before it aborts, high memory usage will cause poor garbage collector performance and high RSS (which is not typically released back to the system, even after the memory is no longer required). Since TCP sockets may never drain if the remote peer does not read the data, writing a socket that is not draining may lead to a remotely exploitable vulnerability.Writing data while the stream is not draining is particularly problematic for a Transform, because the Transform streams are paused by default until they are piped or a 'data' or 'readable' event handler is added.If the data to be written can be generated or fetched on demand, it is recommended to encapsulate the logic into a Readable and use pipe. However, if calling write() is preferred, it is possible to respect backpressure and avoid memory issues using the 'drain' event:function write(data, cb) { if (!stream.write(data)) { stream.once('drain', cb); } else { process.nextTick(cb); } } // Wait for cb to be called before doing any other write. write('hello', () => { console.log('Write completed, do more writes now.'); }); A Writable stream in object mode will always ignore the encoding argument.@param chunkOptional data to write. For streams not operating in object mode, chunk must be a {string}, {Buffer}, {TypedArray} or {DataView}. For object mode streams, chunk may be any JavaScript value other than null.@param encodingThe encoding, if chunk is a string.@param callbackCallback for when this chunk of data is flushed.@returnsfalse if the stream wishes for the calling code to wait for the 'drain' event to be emitted before continuing to write additional data; otherwise true.Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San FranciscoWe're hiring →智能索引记录
-
2026-03-02 22:15:45
综合导航
成功
标题:霍格沃茨推荐最新章节_霍格沃茨推荐全文免费阅读-笔趣阁
简介:霍格沃茨推荐霍格沃茨推荐全文免费阅读霍格沃茨推荐是作家皮皮王123的最新玄幻小说大作,笔趣阁提供霍格沃茨推荐首发最新章节
-
2026-03-02 11:33:51
综合导航
成功
标题:四年级读后感:读《目送》有感_550字_作文网
简介:在今年的中秋节中,妈妈赠送了我一件礼物。在听到礼物的时候,我特别兴奋。可是,当妈妈吧把礼物交到我手上的时候,我有点失落。
-
2026-03-02 22:18:54
综合导航
成功
标题:撩错了! 南浅最新章节_撩错了! 南浅小说免费全文阅读_恋上你看书网
简介:撩错了! 南浅是由作者:姜倾心霍栩所著,恋上你看书网免费提供撩错了! 南浅全文在线阅读。<br />三秒记住本站:恋上你
-
2026-03-02 17:52:26
综合导航
成功
标题:When issuing currency becomes an assembly line Bee Network
简介:In 2025, the productivity revolution in the crypto market wi
-
2026-03-02 14:52:07
图片素材
成功
标题:亲情的作文20字 描写亲情的作文 关于亲情的作文-作文网
简介:作文网精选关于亲情的20字作文,包含亲情的作文素材,关于亲情的作文题目,以亲情为话题的20字作文大全,作文网原创名师点评
-
2026-03-02 18:09:51
综合导航
成功
标题:† Betwynde. World English Historical Dictionary
简介:† Betwynde. World English Historical Dictionary
-
2026-03-02 12:08:19
综合导航
成功
标题:Home - SMZ
简介:SMZ. We are a full-service creative and media agency who has
-
2026-03-02 19:53:47
综合导航
成功
标题:我有一卷神仙图最新章节(第九天命),我有一卷神仙图全文阅读无弹窗_小说全文在线阅读,新笔趣阁(56xu.com)
简介:新笔趣阁免费提供第九天命写的武侠仙侠经典作品我有一卷神仙图,我有一卷神仙图小说免费阅读,我有一卷神仙图最新章节,我有一卷
-
2026-03-02 12:16:44
综合导航
成功
标题:Contract jobs · GQR
简介:Job Search Page 1 - GQR
-
2026-03-02 22:26:16
电商商城
成功
标题:加厚可拆卸两节裤型号规格 - 京东
简介:京东是国内专业的加厚可拆卸两节裤网上购物商城,本频道提供加厚可拆卸两节裤型号、加厚可拆卸两节裤规格信息,为您选购加厚可拆
-
2026-03-02 20:02:32
房产家居
成功
标题:鲁匠装饰招聘-三明鲁匠装饰工程有限公司招聘-597直聘
简介:597直聘为您提供鲁匠装饰招聘信息、公司简介、公司地址、公司福利等详细信息,让您在选择鲁匠装饰前有一个全面的了解.公司介
-
2026-03-02 10:36:23
综合导航
成功
标题:MKS Inc.
简介:MKS provides instruments, systems, subsystems and process co
-
2026-03-02 18:08:07
视频影音
成功
标题:慕先生的心尖娇宠最新章节(艾维斯迪恩)_小说慕先生的心尖娇宠全文阅读免费无弹窗_新笔趣阁(56xu.com)
简介:小说慕先生的心尖娇宠最新章节无弹窗全文阅读由艾维斯迪恩提供:他是权势滔天,俊美矜贵的大人物,清冷孤傲。某日,保镖来报:“
-
2026-03-02 22:08:02
旅游出行
成功
标题:姓氏人口集中系数,姓氏人口调查? - 吉吉算命网
简介:【导读】吉吉算命网分享:“姓氏人口集中系数”,“以及姓氏人口调查”的相关问答。目录:1、印度为什么贫富差距这么大?2、泰
-
2026-03-02 18:14:53
综合导航
成功
标题:Apple Podcasts - Apple (MX)
简介:Apple Podcasts ofrece millones de programas, selecciones de
-
2026-03-02 13:50:10
综合导航
成功
标题:新型コロナウイルス感染症の影響による当社フィリピン拠点の操業について(3月17日時点) コネクタ メーカー JAE 日本航空電子工業
简介:日本航空電子工業株式会社(JAE)の新型コロナウイルス感染症の影響による当社フィリピン拠点の操業について(3月17日時点
-
2026-03-02 20:04:34
综合导航
成功
标题:@parweb
简介:parweb 在 NS6.com 上的链接和联系信息页面的集合
-
2026-03-02 12:11:14
数码科技
成功
标题:女生qq名字好听又短-免费起名_免费取名_宝宝起名_起名软件_名字测试打分解名(缇帕电子科技)-起点起名网
简介:虽然现在的聊天软件有很多,但是得到大家欢心的,就只有那么几个,qq就是其中比较受欢迎的软件,其经过长期的发展,内部稳定,
-
2026-03-02 18:11:22
综合导航
成功
标题:Car Parking Kit - Play The Free Game Online
简介:Car Parking Kit - click to play online. Imagine you are a bu
-
2026-03-02 22:02:45
综合导航
成功
标题:Автоматичний вимикач E.NEXT 1-п e.mcb.stand. 63А C ( 4,5кА) (s002014) (214285860) - RIA
简介:Продаю на RIA - Автоматичний вимикач E.NEXT 1-п e.mcb.stand.
-
2026-03-02 12:19:10
综合导航
成功
标题:精选庆六一作文600字3篇
简介:在学习、工作或生活中,大家都写过作文,肯定对各类作文都很熟悉吧,作文是一种言语活动,具有高度的综合性和创造性。怎么写作文
-
2026-03-02 10:57:47
教育培训
成功
标题:我的语文老师作文
简介:在日常学习、工作和生活中,大家总少不了接触作文吧,借助作文人们可以实现文化交流的目的。你知道作文怎样写才规范吗?以下是小
-
2026-03-02 15:06:52
电商商城
成功
标题:SANWA SUPPLY碳纤维三脚架/云台 - 京东
简介:京东是国内专业的SANWA SUPPLY碳纤维三脚架/云台网上购物商城,本频道提供SANWA SUPPLY碳纤维三脚架/
-
2026-03-02 11:29:40
综合导航
成功
标题:【精品】叙事优秀作文9篇
简介:在日常生活或是工作学习中,大家都尝试过写作文吧,作文是一种言语活动,具有高度的综合性和创造性。那么你有了解过作文吗?下面
-
2026-03-02 11:48:34
综合导航
成功
标题:Home Williams & Connolly LLP
简介:Williams & Connolly is widely recognized as one of the natio
-
2026-03-02 14:19:50
综合导航
成功
标题:《低俗怪谈 第二季》在线观看-迅雷下载-最新美剧-美剧网
简介:低俗怪谈 第二季剧情介绍:低俗怪谈 第二季是由詹姆斯·哈维斯,布莱恩·柯克,达蒙·托马斯,卡莉·斯考格兰德执导,提摩西·
-
2026-03-02 19:53:30
综合导航
成功
标题:Juice Pipe Connect - Play The Free Mobile Game Online
简介:Juice Pipe Connect - click to play online. Juice Pipe Connec
-
2026-03-02 20:01:40
综合导航
成功
标题:NOVA people? [Archive] - Toyota MR2 Message Board
简介:Anyone have a set of stock 14s for MK1 or some kind of after
-
2026-03-02 11:54:25
综合导航
成功
标题:生活更美好作文
简介:在平平淡淡的日常中,大家都写过作文,肯定对各类作文都很熟悉吧,通过作文可以把我们那些零零散散的思想,聚集在一块。你知道作
-
2026-03-02 22:14:52
综合导航
成功
标题:Princess Little Mermaid - Free Online Game on 4J.com
简介:Princess Little Mermaid is a free online game on 4j.Com. You