BLTE Containers - d07RiV/blizzget GitHub Wiki

All files downloaded from /data URLs come in BLTE containers, which serve as the primary (and only) method of compression used in the CASC system.

These containers consist of the following sections:

  • Header
  • Chunk information (optional)
  • Chunks

Data structures:

  • Header (8 bytes)
Offset Type Name Description
0x00 char[4] Signature "BLTE"
0x04 uint32 [BE] HeaderSize Size of BLTE header + chunk information, or 0 for one-block file (big endian)
  • Chunk information (variable size)

Only present if HeaderSize is not zero.

Offset Type Name Description
0x00 uint16 Flags Unknown flags
0x02 uint16 [BE] ChunkCount Number of compressed chunks
0x04 ChunkInfoEntry[ChunkCount] Chunks Chunk information
  • ChunkInfoEntry (24 bytes)
Offset Type Name Description
0x00 uint32 [BE] CompressedSize Size of the compressed chunk (including the compression type byte)
0x04 uint32 [BE] DecompressedSize Size of the decompressed chunk
0x08 char[16] Checksum MD5 of the compressed chunk (including the compression type byte)
  • Chunk (variable size)

If HeaderSize is zero, only one chunk is present. Otherwise, ChunkCount chunks are present, their sizes are listed in ChunkInfoEntry structures.

Offset Type Name Description
0x00 char EncodingType Known values: N, Z, F, E
0x01 char[CompressedSize - 1] Data Encoded data

Encoding types:

  • N: Plain (uncompressed) data.
  • Z: Zlib deflated data.
  • F: Recursively encoded BLTE data.
  • E: Encrypted data.

In order to download the game data, we will only need to decode the encoding, download and install files, which only use N and Z encoding modes. For an explanation of the other modes, visit wowdev Wiki or browse the CascLib sources.