pako - v3.0.1
    Preparing search index...

    Function inflate

    • One-shot inflate decompress. Autodetects gzip/zlib format via the wrapper header — so ungzip is just a convenience alias of this function. See InflateOptions for zlib options. Set toText: true to decode the result as UTF-8 text.

      Type Parameters

      Parameters

      • input: ArrayBuffer | Uint8Array<ArrayBufferLike>
      • options: O = ...

      Returns O extends { toText: true } ? string : Uint8Array<ArrayBuffer>

      import { deflate, inflate } from 'pako'

      const input = deflate(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9]))
      let output

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