Luxar Viewer API Documentation - v2026.9.22
    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,
        ): Promise<Uint8Array<ArrayBufferLike> | undefined>;
        probeIdentity?(
            signal?: AbortSignal,
            timeoutMs?: number,
        ): Promise<string | null>;
        dispose(): void;
    }
    Index
    • Read one member.

      signal is ADVISORY. A container whose reader has no per-call channel — a zip, whose unzipit reader is read(offset, size) — cannot cancel an individual member read, and an ambient "current signal" would be raced by concurrent gets. Such an implementation scopes real cancellation to its own lifetime instead, aborting in flight reads from dispose(), and uses this signal only to stop early and to label the outcome. Do not read a passed signal as a guarantee that the bytes stopped arriving.

      Parameters

      • key: string
      • Optionalsignal: AbortSignal

      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>