Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Module data/zip/store

    Luxar's zipped-store reader: a thin, lifecycle-safe wrapper over @zarrita/storage's ZipFileStore.

    The wrapper exists for one reason — WHEN the central directory is read. Stock ZipFileStore reads it in its CONSTRUCTOR and memoizes the resulting promise unconditionally:

    constructor(reader, opts) { this.info = unzip(reader).then(...) }
    

    Two consequences, both bad once the store sits behind a cache with a dataset-switch lifecycle:

    1. A failure is permanent. One transient blip while reading the ~141 kB preamble rejects info forever; every later get throws the same stale error, and the only recovery is a page reload.
    2. Construction does I/O. Building a store — which the cache layer may do while merely deciding policy — fires network requests before anyone has asked for a key.

    So: build lazily on first read, memoize only on success, and let a failed attempt be retried by the next caller. Reads are driven by a per-store AbortController that only dispose() trips, never a per-caller signal — one cancelled chunk must not poison the directory every other chunk needs.

    LuxarZipStore
    createZipStoreOptions