[doc] Further improvements/fixes to Kaitai Struct file

async-test
derrod 2021-11-24 21:49:29 +01:00
parent 8d4cf943c7
commit c9f9d38f1b
1 changed files with 21 additions and 20 deletions

View File

@ -1,27 +1,31 @@
meta: meta:
id: ue_manifest id: ue_manifest
title: Binary Unreal Engine Manifest Version 20
application: Epic Games Launcher
file-extension: manifest file-extension: manifest
license: 0BSD
endian: le endian: le
seq: seq:
- id: magic
contents: [0x0C, 0xC0, 0xBE, 0x44]
- id: header_size
type: u4
- id: header - id: header
size: header_size - 8
type: header type: header
- id: body_compressed - id: body_compressed
size-eos: true size: header.size_compressed
type: body type: body
process: zlib process: zlib
if: header.stored_as == stored_as_flag::compressed if: header.is_compressed
- id: body_uncompressed - id: body_uncompressed
size-eos: true size: header.size_uncompressed
type: body type: body
if: header.stored_as == stored_as_flag::uncompressed if: not header.is_compressed
- id: unknown
size-eos: true
types: types:
header: header:
seq: seq:
- id: magic
contents: [0x0C, 0xC0, 0xBE, 0x44]
- id: header_size
type: u4
- id: size_uncompressed - id: size_uncompressed
type: u4 type: u4
- id: size_compressed - id: size_compressed
@ -34,7 +38,10 @@ types:
- id: version - id: version
type: u4 type: u4
- id: unknown - id: unknown
size-eos: true size: header_size - 41
instances:
is_compressed:
value: stored_as.to_i & 1 == 1
body: body:
seq: seq:
- id: meta_size - id: meta_size
@ -221,18 +228,13 @@ types:
- id: count - id: count
type: u4 type: u4
- id: elements - id: elements
type: chunk_part_entry type: chunk_part
repeat: expr repeat: expr
repeat-expr: count repeat-expr: count
chunk_part_entry: chunk_part:
seq: seq:
- id: entry_size - id: entry_size
type: u4 type: u4
- id: chunk_part
type: chunk_part
size: entry_size - 4
chunk_part:
seq:
- id: guid - id: guid
size: 16 size: 16
- id: offset - id: offset
@ -240,7 +242,7 @@ types:
- id: size - id: size
type: u4 type: u4
- id: unknown - id: unknown
size-eos: true size: entry_size - 28
md5_hash: md5_hash:
seq: seq:
- id: has_md5 - id: has_md5
@ -250,8 +252,7 @@ types:
if: has_md5 != 0 if: has_md5 != 0
instances: instances:
body: body:
value: 'header.stored_as == stored_as_flag::compressed ? body_compressed : body_uncompressed' value: 'header.is_compressed ? body_compressed : body_uncompressed'
if: header.stored_as == stored_as_flag::compressed or header.stored_as == stored_as_flag::uncompressed
enums: enums:
stored_as_flag: stored_as_flag:
0x0: uncompressed 0x0: uncompressed