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

    Module data/zarr/zip-range-reader

    HTTP range reader for zipped Zarr stores (.zarr.zip).

    ZipFileStore reads an archive by asking a Reader for byte ranges: first the tail (to find the central directory), then one range per member. This module supplies that reader.

    It exists rather than reusing @zarrita/storage's own HTTPRangeReader because that one only asserts response.ok. A server that ignores Range answers 200 with the WHOLE file, ok is true, and the full body is handed back as if it were the requested slice — the zip parser then reads the wrong bytes at every offset. The failure is silent and looks like a corrupt archive rather than a misconfigured server, and it is not hypothetical: Python's plain http.server has no Range support at all. The Playwright fixture server and luxar serve <dir> both provide the required strict range responses.

    So every ranged read here REQUIRES 206 Partial Content, verifies the returned window, and cross-checks the Content-Range total against the length learned up front. Range-protocol failures raise RangeUnsupportedError; missing and access-controlled archives retain status-specific errors instead of suggesting the wrong fix.

    RangeUnsupportedError
    LuxarHttpRangeReader
    parseContentRangeTotal