From mgsdevwiki
Jump to: navigation, search

SEGS contain multiple chunks of zlib compressed data, the data being raw textures as a dds texture data with a custom header.

Format Specifications

Metal Gear Solid 4

uint 32 {4} Magic: segs
uint 16 {2} Flag, unknown
uint 16 {2} Number of chunks in seg
uint 32 {4} Total Uncompressed size
uint 32 {4} Total size of seg (Little Endian)
Chunk index (For each Chunk)
uint 16 {2} chunk compressed size
uint 16 {2} chunk uncompressed size
uint 32 {4} chunk offset + 1
Chunk data (For each Chunk)
bytes {x} zlib compressed data