Skip to Content
DevelopersError CodesCodesTerrainInvalid decompressed chunk bytes

Invalid decompressed chunk bytes

Code

TERRAIN/CHUNK_INVALID_DECOMPRESSED_BYTES

What it means

Chunk bytes were downloaded/decompressed, but the resulting byte buffer is not a valid chunk payload for Akkadia’s terrain format (it cannot be reinterpreted as a Uint32Array).

When it happens

  • Decompressed chunk bytes are malformed (e.g. wrong byte length/alignment for Uint32Array).

Typical scenarios:

  • Storage returns data that was already decompressed by an HTTP client (double-decompress mismatch)
  • Corrupted chunk payload in storage/cache
  • Version/format mismatch between producer and consumer

How to handle

  • Treat as data corruption or incompatible encoding.
  • Log meta.byteLength, meta.gzip, and meta.storagePath (when present).

Recovery guidance:

  • If this happens for a single key, invalidate cache/storage for that chunk and regenerate.
  • If it happens broadly, suspect a systemic format change or storage encoding regression.
Last updated on
Docsv1.0.10