CAS compression blocks
An asset’s CAS range is a sequence of eight-byte headers and exactly sized payloads. Concatenating the decoded blocks reconstructs the asset. Physical range length includes the headers; decoded length does not. Observed
| Offset | Size | Type | Field | Confidence | Notes |
|---|---|---|---|---|---|
| 0x0 | 1 | u8 | dictionary metadata | Unknown | Zero in all 1,001,300 headers of the indexed ranges. |
| 0x1 | 3 | u24be | decoded length | Observed | |
| 0x4 | 1 | u8 | codec and reserved bit | Observed | Low seven bits select the codec; high bit is reserved. |
| 0x5 | 1 | u8 | flags and payload length high bits | Observed | Low nibble is length bits 16–19; the upper nibble is 7 in every stock block. |
| 0x6 | 2 | u16be | payload length low bits | Observed |
| Codec | Payload | Confidence |
|---|---|---|
0 |
Stored bytes, equal in length to the decoded block | Sourced · ReSkate |
2 |
zlib | Sourced · ReSkate |
0x11, 0x15, 0x19 |
Oodle-compressed bytes | Sourced · ReSkate |
Studio output uses Oodle CAS blocks. A block’s codec is independent of its asset’s resource type. Observed
Each of the 208 sampled 0x11 blocks holds one Oodle block that begins 8C 06 (Kraken, restart bit set), and walking
its block and quantum headers ends exactly at the block’s last payload byte. Observed · 208 sampled blocks
Stock data
Section titled “Stock data”The stock game Data has 23 TOCs over 72 CAS files. Following exactly the chunk and bundle-asset ranges the TOCs
index, its CAS files hold 999,764 distinct physical blocks: 153,945 with codec 0 and 845,819 with codec 0x11. No
indexed block uses 2, 0x15, 0x19 or any other codec. Proven · every block the TOCs index; headers read, a sample decoded
No 0x11 block’s payload is the same length as its decoded block, so the stock data shows no compressed block
that falls back to stored bytes at equal size. Observed That some blocks are stored with codec 0 does not
show when the producer chooses to store. Inferred
The bundle manifests that live in CAS files (6,056 of them) are stored raw, without block headers; reading them as CAS frames misreads them. Observed Gaps and padding between indexed ranges are not blocks. 30,293,670 bytes of the CAS files lie outside every indexed asset and manifest range, so the codec census does not cover them. Observed
Every header of every indexed range reads with byte 0 equal to zero, the top bit of byte 4 clear and the upper nibble
of byte 5 equal to 7 (1,001,300 headers over 723,698 ranges, 999,764 distinct blocks). The payload-length bits 16 to 19
are nonzero in 82,951 blocks, all of them stored (codec 0) 64 KiB blocks whose payload is 65,536 bytes; every other
block has a payload below 65,536. Every block that does not end its range decodes to exactly 65,536 bytes, and every
range chains from its first header to its last byte with no remainder. Proven · all indexed ranges of the stock install
The upper nibble of byte 5 is 7 in the 1,535,187 blocks of the files that the 82 mod folders installed beside the game
list in their bundles as well, among them maps compiled by ReSkate Studio. Observed · every listed file of those 82 folders
No stock region names a Patch folder, so no delta file occurs among the ranges. Proven · the stock install
The files that the TOCs of 82 installed mod folders reach (213 TOCs, 9,562,590 distinct file ranges, the stock files
they reference included) hold 10,508,160 block headers. Every one has byte 0 equal to zero, the top bit of byte 4 clear
and the upper nibble of byte 5 equal to 7; the codec is 0 in 2,206,387 blocks and 0x11 in 8,301,773, and no other.
No block header is eight zero bytes, and every range chains from its first header to its last byte. Observed · every file range the 213 TOCs of those 82 folders list
So no codec 0x09, 0x0F (or dictionary byte) and no empty eight-byte block occurs in the stock data or in the mods
read beside it.
No stock block uses a nonzero dictionary byte or a flags nibble other than 7, so the stock data does not show what either would mean. The measured framing does not establish support for every Frostbite CAS codec. Unknown