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

    Interface ArchiveByteReader

    The minimum a byte-container has to offer for ChunkSource to read it.

    Declared HERE, and injected, rather than importing a concrete store: src/cache sits below src/data in the layer order, so the cache layer must not reach up for data/zip/store. The cache defines the port; the data layer supplies the adapter. It also keeps this module ignorant of zip specifics entirely.

    interface ArchiveByteReader {
        get(
            key: string,
            signal?: AbortSignal,
            options?: ChunkSourceGetOptions,
        ): Promise<Uint8Array<ArrayBufferLike> | undefined>;
        probeIdentity?(
            signal?: AbortSignal,
            timeoutMs?: number,
        ): Promise<string | null>;
        dispose(): void;
    }
    Index
    • Read one member.

      signal cancels the read as far as the container can. The zip reader cancels the member's one-GET window fetch with it (queued in the fetch gate or in flight); a follow-up read unzipit issues outside that window — its reader is read(offset, size), with no per-call channel — is scoped to the container's lifetime instead and aborted only by dispose(). So do not read a passed signal as a guarantee that every byte stopped arriving.

      Parameters

      Returns Promise<Uint8Array<ArrayBufferLike> | undefined>

    • Fresh identity of the container, bypassing caches — an opaque token, so this layer needs to know nothing about ETags or HTTP. null means "cannot tell", which is never evidence of a change.

      The container answers this rather than the caller because it is a request against the same URL the container already reads: doing it here lets one HEAD serve both identity and the archive length.

      Parameters

      • Optionalsignal: AbortSignal
      • OptionaltimeoutMs: number

      Returns Promise<string | null>