import { gunzip } from 'fflate';
export async function extractCompressedBase64(data, output = 'uint') {
  const uint = Uint8Array.from(atob(data), c => c.charCodeAt(0));
  const decompressed = await new Promise((res, rej) => gunzip(uint, (err, data) => err ? rej(err) : res(data)));
  if (output === 'uint') {
    return decompressed;
  }
  // @ts-ignore - TS2345 TypeScript 5.9.2 upgrade
  return new Response(decompressed).blob();
}