happy-opfs
    Preparing search index...

    Function unzipStream

    • Unzip a zip file to a directory using streaming decompression. Equivalent to unzip -o <zipFilePath> -d <destDir>

      This function processes the zip file incrementally, minimizing memory usage. Recommended for large files (>10MB). For small files, consider using unzip instead.

      Use fflate as the unzip backend.

      Parameters

      • zipFilePath: string

        Zip file path.

      • destDir: string

        The directory to unzip to.

      Returns AsyncVoidIOResult

      A promise that resolves to an AsyncIOResult indicating whether the zip file was successfully unzipped.

      2.0.0

      • unzip for batch version (faster for small files)
      • zipStream for the reverse operation
      (await unzipStream('/downloads/large-archive.zip', '/extracted'))
      .inspect(() => console.log('Unzipped successfully'));