MCPcopy Index your code
hub / github.com/nodejs/node / zlibBufferOnEnd

Function zlibBufferOnEnd

lib/zlib.js:150–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148}
149
150function zlibBufferOnEnd() {
151 let buf;
152 if (this.nread === 0) {
153 buf = new FastBuffer();
154 } else {
155 const bufs = this.buffers;
156 buf = (bufs.length === 1 ? bufs[0] : Buffer.concat(bufs, this.nread));
157 }
158 this.close();
159 if (this._info)
160 this.cb(null, { buffer: buf, engine: this });
161 else
162 this.cb(null, buf);
163}
164
165function zlibBufferSync(engine, buffer) {
166 if (typeof buffer === 'string') {

Callers

nothing calls this directly

Calls 2

concatMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…