mwg API
    Preparing search index...

    Function inflateBounded

    • Inflates a raw DEFLATE stream while counting the output, so a few kilobytes that expand into gigabytes are refused after maxOutputBytes, not after they have filled memory.

      Parameters

      • packed: Uint8Array
      • limits: Partial<DecoderLimits> = {}
      • format: "deflate" | "deflate-raw" | "gzip" = 'deflate-raw'

      Returns Promise<Uint8Array<ArrayBufferLike>>

      import { inflateBounded } from '@datamoc/mwg/audio';

      declare const packed: Uint8Array;

      const bytes = await inflateBounded(packed, { maxOutputBytes: 1_000_000 });