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

Method _transform

deps/undici/undici.js:5896–5908  ·  view source on GitHub ↗
(chunk, encoding, callback)

Source from the content-addressed store, hash-verified

5894 this.#zlibOptions = zlibOptions;
5895 }
5896 _transform(chunk, encoding, callback) {
5897 if (!this._inflateStream) {
5898 if (chunk.length === 0) {
5899 callback();
5900 return;
5901 }
5902 this._inflateStream = (chunk[0] & 15) === 8 ? zlib.createInflate(this.#zlibOptions) : zlib.createInflateRaw(this.#zlibOptions);
5903 this._inflateStream.on("data", this.push.bind(this));
5904 this._inflateStream.on("end", () => this.push(null));
5905 this._inflateStream.on("error", (err) => this.destroy(err));
5906 }
5907 this._inflateStream.write(chunk, encoding, callback);
5908 }
5909 _final(callback) {
5910 if (this._inflateStream) {
5911 this._inflateStream.end();

Callers

nothing calls this directly

Calls 15

callbackFunction · 0.50
onMethod · 0.45
bindMethod · 0.45
pushMethod · 0.45
destroyMethod · 0.45
writeMethod · 0.45
handleBOMMethod · 0.45
hasCurrentByteMethod · 0.45
currentByteMethod · 0.45
consumeCurrentByteMethod · 0.45
hasPendingEventMethod · 0.45
processEventMethod · 0.45

Tested by

no test coverage detected