Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/../uploads/../../../../instantly.picotech.app/homes/../../wa.picotech.app/public_html/node_modules/escape-html/../querystring/../@protobufjs/../delayed-stream/../validator/../cheerio/../hasown/../axios/lib/helpers
الملفات الموجودة في هذا الـ Path:
.
..
AxiosTransformStream.js
AxiosURLSearchParams.js
HttpStatusCode.js
README.md
ZlibHeaderTransformStream.js
bind.js
buildURL.js
callbackify.js
combineURLs.js
cookies.js
deprecatedMethod.js
formDataToJSON.js
formDataToStream.js
fromDataURI.js
isAbsoluteURL.js
isAxiosError.js
isURLSameOrigin.js
null.js
parseHeaders.js
parseProtocol.js
readBlob.js
speedometer.js
spread.js
throttle.js
toFormData.js
toURLEncodedForm.js
validator.js

مشاهدة ملف: ZlibHeaderTransformStream.js

"use strict";

import stream from "stream";

class ZlibHeaderTransformStream extends stream.Transform {
  __transform(chunk, encoding, callback) {
    this.push(chunk);
    callback();
  }

  _transform(chunk, encoding, callback) {
    if (chunk.length !== 0) {
      this._transform = this.__transform;

      // Add Default Compression headers if no zlib headers are present
      if (chunk[0] !== 120) { // Hex: 78
        const header = Buffer.alloc(2);
        header[0] = 120; // Hex: 78
        header[1] = 156; // Hex: 9C 
        this.push(header, encoding);
      }
    }

    this.__transform(chunk, encoding, callback);
  }
}

export default ZlibHeaderTransformStream;