@ferrybig/cgeodata-reader
    Preparing search index...

    Interface ChunkRecords

    One chunk's records (Section 8), decoded: record j is the cell codes[j] at depth depths[j], attributed to palette[paletteIndices[j] - 1] (or to no place for index 0).

    interface ChunkRecords {
        palette: number[];
        codes: Uint32Array;
        depths: Uint8Array;
        paletteIndices:
            | Uint8Array<ArrayBufferLike>
            | Uint32Array<ArrayBufferLike>
            | Uint16Array<ArrayBufferLike>;
    }
    Index
    palette: number[]

    Global place ids referenced by this chunk, indexed 0..P-1.

    codes: Uint32Array

    Stored Morton codes, chunk-local, strictly increasing. Typed arrays rather than plain ones for this and the other per-record fields: a big chunk holds over a million records, and parsing and holding them as boxed JS arrays costs several times as much. 32 bits, as every code is below 4^MAX_SUPPORTED_DEPTH.

    depths: Uint8Array

    Each record's depth in the chunk's quadtree, 0 to max_depth.

    paletteIndices:
        | Uint8Array<ArrayBufferLike>
        | Uint32Array<ArrayBufferLike>
        | Uint16Array<ArrayBufferLike>

    Local palette index per record: 0 = "no place", k = palette[k-1]. As wide as the file stores them (Section 8.3's S), rounding 3 bytes up to a Uint32Array.