-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest_col_fixed.ksy
48 lines (47 loc) · 905 Bytes
/
test_col_fixed.ksy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# SPDX-FileCopyrightText: 2021 Petr Pucil <[email protected]>
#
# SPDX-License-Identifier: MIT
meta:
id: test_col_fixed
license: MIT
ks-version: 0.9 # using `valid`
endian: le
seq:
- id: table
type: data_table
types:
data_table:
seq:
- id: n_rows
type: u4
- id: n_columns
type: u1
- id: column_types
type: u2
repeat: expr
repeat-expr: n_columns
- id: check_column_types
size: 0
valid:
expr: |
column_types.size == 4
and column_types[0] == 1
and column_types[1] == 2
and column_types[2] == 3
and column_types[3] == 4
- id: table_rows
type: table_row
repeat: expr
repeat-expr: n_rows
table_row:
seq:
- id: flags
type: u1
- id: a
type: u2
- id: b
type: u4
- id: c
type: f4
- id: d
type: f8