png-compressor
    Preparing search index...

    Function inflate

    • inflate(data[, options]) -> Uint8Array|String

      • data (Uint8Array|ArrayBuffer): input data to decompress.
      • options (Object): zlib inflate options.

      Decompress data with inflate/ungzip and options. Autodetect format via wrapper header by default. That's why we don't provide separate ungzip method.

      Supported options are:

      • windowBits

      http://zlib.net/manual.html#Advanced for more information.

      Sugar (options):

      • raw (Boolean) - say that we work with raw stream, if you don't wish to specify negative windowBits implicitly.
      • to (String) - if equal to 'string', then result will be converted from utf8 to utf16 (javascript) string. When string output requested, chunk length can differ from chunkSize, depending on content.
      const pako = require('pako');
      const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));
      let output;

      try {
      output = pako.inflate(input);
      } catch (err) {
      console.log(err);
      }

      Parameters

      • input: any
      • options: any

      Returns any