XYZ Maps Documentation
    Preparing search index...

    Interface WorkerPreProcessorUtils

    Worker-safe helpers available to worker preprocessors.

    interface WorkerPreProcessorUtils {
        decodeBase64(encoded: string): Uint8Array;
        decodeTga(bytes: Uint8Array): ModelTextureData;
        decompress(
            bytes: Uint8Array,
            format: "gzip" | "deflate" | "deflate-raw",
        ): Promise<Uint8Array<ArrayBufferLike>>;
    }
    Index
    • Decode standard base64 into bytes using native atob validation. ASCII whitespace and omitted padding are accepted; invalid alphabet or padding throws. This does not decode text or accept base64url.

      Parameters

      • encoded: string

      Returns Uint8Array

    • Decode an uncompressed or RLE-compressed 24/32-bit truecolor TGA image into ModelTextureData, with bottom-to-top RGBA rows and flipY: false. Throws an Error for invalid or unsupported input.

      Parameters

      • bytes: Uint8Array

      Returns ModelTextureData

    • Decompress bytes using native DecompressionStream, preserving the input. Rejects for malformed data, unsupported formats, or unavailable native APIs. No base64/text detection or fallback is performed.

      Parameters

      • bytes: Uint8Array
      • format: "gzip" | "deflate" | "deflate-raw"

      Returns Promise<Uint8Array<ArrayBufferLike>>