forked from kaitai-io/kaitai_struct_formats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are two types of RIFF structs: with asserts (chunk and parent_chunk_data) and without asserts (chunk_generic and parent_chunk_data_generic). Those without asserts won't be needed when kaitai-io/kaitai_struct#435 (comment) is resolved.
- Loading branch information
1 parent
d0918ed
commit 4b4c7dd
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
meta: | ||
id: chunk | ||
encoding: ASCII | ||
endian: le | ||
params: | ||
- id: expected_id | ||
type: str | ||
seq: | ||
- id: id_assert | ||
type: str | ||
size: 4 | ||
valid: expected_id | ||
- id: len | ||
type: u4 | ||
- id: data_slot | ||
type: slot | ||
size: len | ||
- id: pad_byte | ||
size: len % 2 # if size is odd, there is 1 padding byte | ||
types: | ||
slot: {} # Keeps _io for later use of same substream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
meta: | ||
id: chunk_generic | ||
encoding: ASCII | ||
endian: le | ||
seq: | ||
- id: id | ||
type: str | ||
size: 4 | ||
- id: len | ||
type: u4 | ||
- id: data_slot | ||
type: slot | ||
size: len | ||
- id: pad_byte | ||
size: len % 2 # if size is odd, there is 1 padding byte | ||
types: | ||
slot: {} # Keeps _io for later use of same substream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
meta: | ||
id: parent_chunk_data | ||
encoding: ASCII | ||
endian: le | ||
params: | ||
- id: expected_form_type | ||
type: str | ||
seq: | ||
- id: form_type_assert | ||
type: str | ||
size: 4 | ||
valid: expected_form_type | ||
- id: subchunks_slot | ||
type: slot | ||
size-eos: true | ||
types: | ||
slot: {} # Keeps _io for later use of same substream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
meta: | ||
id: parent_chunk_data_generic | ||
encoding: ASCII | ||
endian: le | ||
seq: | ||
- id: form_type | ||
type: str | ||
size: 4 | ||
- id: subchunks_slot | ||
type: slot | ||
size-eos: true | ||
types: | ||
slot: {} # Keeps _io for later use of same substream |