@zip.js/zip.js
    Preparing search index...

    Function createSyncAccessHandleTempStream

    • Builds a ZipWriterConstructorOptions.createTempStream factory that spills the data of buffered entries to the Origin Private File System (OPFS) via FileSystemSyncAccessHandle instead of keeping it in memory.

      This is the fastest disk-backed temporary storage on the web platform: it behaves like createOPFSTempStream (same options, same bounded-memory profile) but writes roughly 2.5 times faster in Chromium and Firefox and reads back several times faster in Firefox and Safari, making disk-backed staging nearly as fast as the in-memory default.

      FileSystemSyncAccessHandle is only exposed in dedicated workers, so this helper requires running the ZipWriter inside a worker; it throws when created in an unsupported context unless getDirectory is provided.

      Parameters

      Returns () => TempStream

      A factory suitable for ZipWriterConstructorOptions.createTempStream.