Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitai-bot committed Mar 22, 2024
1 parent 7710e2a commit 17d1e51
Show file tree
Hide file tree
Showing 516 changed files with 2,142 additions and 4,206 deletions.
60 changes: 30 additions & 30 deletions compiled/construct/bcd_user_type_be.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,50 @@
'b2' / Int8ub,
'b3' / Int8ub,
'b4' / Int8ub,
'as_int' / Computed(lambda this: ((((((((this.digit8 * 1) + (this.digit7 * 10)) + (this.digit6 * 100)) + (this.digit5 * 1000)) + (this.digit4 * 10000)) + (this.digit3 * 100000)) + (this.digit2 * 1000000)) + (this.digit1 * 10000000))),
'as_str' / Computed(lambda this: str(this.digit1) + str(this.digit2) + str(this.digit3) + str(this.digit4) + str(this.digit5) + str(this.digit6) + str(this.digit7) + str(this.digit8)),
'digit1' / Computed(lambda this: ((this.b1 & 240) >> 4)),
'digit2' / Computed(lambda this: (this.b1 & 15)),
'digit3' / Computed(lambda this: ((this.b2 & 240) >> 4)),
'digit4' / Computed(lambda this: (this.b2 & 15)),
'digit5' / Computed(lambda this: ((this.b3 & 240) >> 4)),
'digit6' / Computed(lambda this: (this.b3 & 15)),
'digit7' / Computed(lambda this: ((this.b4 & 240) >> 4)),
'digit8' / Computed(lambda this: (this.b4 & 15)),
'as_int' / Computed(lambda this: ((((((this.digit8 * 1 + this.digit7 * 10) + this.digit6 * 100) + this.digit5 * 1000) + this.digit4 * 10000) + this.digit3 * 100000) + this.digit2 * 1000000) + this.digit1 * 10000000),
'as_str' / Computed(lambda this: ((((((str(this.digit1) + str(this.digit2)) + str(this.digit3)) + str(this.digit4)) + str(this.digit5)) + str(this.digit6)) + str(this.digit7)) + str(this.digit8)),
'digit1' / Computed(lambda this: (this.b1 & 240) >> 4),
'digit2' / Computed(lambda this: this.b1 & 15),
'digit3' / Computed(lambda this: (this.b2 & 240) >> 4),
'digit4' / Computed(lambda this: this.b2 & 15),
'digit5' / Computed(lambda this: (this.b3 & 240) >> 4),
'digit6' / Computed(lambda this: this.b3 & 15),
'digit7' / Computed(lambda this: (this.b4 & 240) >> 4),
'digit8' / Computed(lambda this: this.b4 & 15),
)

bcd_user_type_be__ltr_obj = Struct(
'b1' / Int8ub,
'b2' / Int8ub,
'b3' / Int8ub,
'b4' / Int8ub,
'as_int' / Computed(lambda this: ((((((((this.digit8 * 1) + (this.digit7 * 10)) + (this.digit6 * 100)) + (this.digit5 * 1000)) + (this.digit4 * 10000)) + (this.digit3 * 100000)) + (this.digit2 * 1000000)) + (this.digit1 * 10000000))),
'as_str' / Computed(lambda this: str(this.digit1) + str(this.digit2) + str(this.digit3) + str(this.digit4) + str(this.digit5) + str(this.digit6) + str(this.digit7) + str(this.digit8)),
'digit1' / Computed(lambda this: ((this.b1 & 240) >> 4)),
'digit2' / Computed(lambda this: (this.b1 & 15)),
'digit3' / Computed(lambda this: ((this.b2 & 240) >> 4)),
'digit4' / Computed(lambda this: (this.b2 & 15)),
'digit5' / Computed(lambda this: ((this.b3 & 240) >> 4)),
'digit6' / Computed(lambda this: (this.b3 & 15)),
'digit7' / Computed(lambda this: ((this.b4 & 240) >> 4)),
'digit8' / Computed(lambda this: (this.b4 & 15)),
'as_int' / Computed(lambda this: ((((((this.digit8 * 1 + this.digit7 * 10) + this.digit6 * 100) + this.digit5 * 1000) + this.digit4 * 10000) + this.digit3 * 100000) + this.digit2 * 1000000) + this.digit1 * 10000000),
'as_str' / Computed(lambda this: ((((((str(this.digit1) + str(this.digit2)) + str(this.digit3)) + str(this.digit4)) + str(this.digit5)) + str(this.digit6)) + str(this.digit7)) + str(this.digit8)),
'digit1' / Computed(lambda this: (this.b1 & 240) >> 4),
'digit2' / Computed(lambda this: this.b1 & 15),
'digit3' / Computed(lambda this: (this.b2 & 240) >> 4),
'digit4' / Computed(lambda this: this.b2 & 15),
'digit5' / Computed(lambda this: (this.b3 & 240) >> 4),
'digit6' / Computed(lambda this: this.b3 & 15),
'digit7' / Computed(lambda this: (this.b4 & 240) >> 4),
'digit8' / Computed(lambda this: this.b4 & 15),
)

bcd_user_type_be__rtl_obj = Struct(
'b1' / Int8ub,
'b2' / Int8ub,
'b3' / Int8ub,
'b4' / Int8ub,
'as_int' / Computed(lambda this: ((((((((this.digit1 * 1) + (this.digit2 * 10)) + (this.digit3 * 100)) + (this.digit4 * 1000)) + (this.digit5 * 10000)) + (this.digit6 * 100000)) + (this.digit7 * 1000000)) + (this.digit8 * 10000000))),
'as_str' / Computed(lambda this: str(this.digit8) + str(this.digit7) + str(this.digit6) + str(this.digit5) + str(this.digit4) + str(this.digit3) + str(this.digit2) + str(this.digit1)),
'digit1' / Computed(lambda this: ((this.b1 & 240) >> 4)),
'digit2' / Computed(lambda this: (this.b1 & 15)),
'digit3' / Computed(lambda this: ((this.b2 & 240) >> 4)),
'digit4' / Computed(lambda this: (this.b2 & 15)),
'digit5' / Computed(lambda this: ((this.b3 & 240) >> 4)),
'digit6' / Computed(lambda this: (this.b3 & 15)),
'digit7' / Computed(lambda this: ((this.b4 & 240) >> 4)),
'digit8' / Computed(lambda this: (this.b4 & 15)),
'as_int' / Computed(lambda this: ((((((this.digit1 * 1 + this.digit2 * 10) + this.digit3 * 100) + this.digit4 * 1000) + this.digit5 * 10000) + this.digit6 * 100000) + this.digit7 * 1000000) + this.digit8 * 10000000),
'as_str' / Computed(lambda this: ((((((str(this.digit8) + str(this.digit7)) + str(this.digit6)) + str(this.digit5)) + str(this.digit4)) + str(this.digit3)) + str(this.digit2)) + str(this.digit1)),
'digit1' / Computed(lambda this: (this.b1 & 240) >> 4),
'digit2' / Computed(lambda this: this.b1 & 15),
'digit3' / Computed(lambda this: (this.b2 & 240) >> 4),
'digit4' / Computed(lambda this: this.b2 & 15),
'digit5' / Computed(lambda this: (this.b3 & 240) >> 4),
'digit6' / Computed(lambda this: this.b3 & 15),
'digit7' / Computed(lambda this: (this.b4 & 240) >> 4),
'digit8' / Computed(lambda this: this.b4 & 15),
)

bcd_user_type_be = Struct(
Expand Down
60 changes: 30 additions & 30 deletions compiled/construct/bcd_user_type_le.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,50 @@
'b2' / Int8ub,
'b3' / Int8ub,
'b4' / Int8ub,
'as_int' / Computed(lambda this: ((((((((this.digit8 * 1) + (this.digit7 * 10)) + (this.digit6 * 100)) + (this.digit5 * 1000)) + (this.digit4 * 10000)) + (this.digit3 * 100000)) + (this.digit2 * 1000000)) + (this.digit1 * 10000000))),
'as_str' / Computed(lambda this: str(this.digit1) + str(this.digit2) + str(this.digit3) + str(this.digit4) + str(this.digit5) + str(this.digit6) + str(this.digit7) + str(this.digit8)),
'digit1' / Computed(lambda this: ((this.b4 & 240) >> 4)),
'digit2' / Computed(lambda this: (this.b4 & 15)),
'digit3' / Computed(lambda this: ((this.b3 & 240) >> 4)),
'digit4' / Computed(lambda this: (this.b3 & 15)),
'digit5' / Computed(lambda this: ((this.b2 & 240) >> 4)),
'digit6' / Computed(lambda this: (this.b2 & 15)),
'digit7' / Computed(lambda this: ((this.b1 & 240) >> 4)),
'digit8' / Computed(lambda this: (this.b1 & 15)),
'as_int' / Computed(lambda this: ((((((this.digit8 * 1 + this.digit7 * 10) + this.digit6 * 100) + this.digit5 * 1000) + this.digit4 * 10000) + this.digit3 * 100000) + this.digit2 * 1000000) + this.digit1 * 10000000),
'as_str' / Computed(lambda this: ((((((str(this.digit1) + str(this.digit2)) + str(this.digit3)) + str(this.digit4)) + str(this.digit5)) + str(this.digit6)) + str(this.digit7)) + str(this.digit8)),
'digit1' / Computed(lambda this: (this.b4 & 240) >> 4),
'digit2' / Computed(lambda this: this.b4 & 15),
'digit3' / Computed(lambda this: (this.b3 & 240) >> 4),
'digit4' / Computed(lambda this: this.b3 & 15),
'digit5' / Computed(lambda this: (this.b2 & 240) >> 4),
'digit6' / Computed(lambda this: this.b2 & 15),
'digit7' / Computed(lambda this: (this.b1 & 240) >> 4),
'digit8' / Computed(lambda this: this.b1 & 15),
)

bcd_user_type_le__ltr_obj = Struct(
'b1' / Int8ub,
'b2' / Int8ub,
'b3' / Int8ub,
'b4' / Int8ub,
'as_int' / Computed(lambda this: ((((((((this.digit8 * 1) + (this.digit7 * 10)) + (this.digit6 * 100)) + (this.digit5 * 1000)) + (this.digit4 * 10000)) + (this.digit3 * 100000)) + (this.digit2 * 1000000)) + (this.digit1 * 10000000))),
'as_str' / Computed(lambda this: str(this.digit1) + str(this.digit2) + str(this.digit3) + str(this.digit4) + str(this.digit5) + str(this.digit6) + str(this.digit7) + str(this.digit8)),
'digit1' / Computed(lambda this: ((this.b4 & 240) >> 4)),
'digit2' / Computed(lambda this: (this.b4 & 15)),
'digit3' / Computed(lambda this: ((this.b3 & 240) >> 4)),
'digit4' / Computed(lambda this: (this.b3 & 15)),
'digit5' / Computed(lambda this: ((this.b2 & 240) >> 4)),
'digit6' / Computed(lambda this: (this.b2 & 15)),
'digit7' / Computed(lambda this: ((this.b1 & 240) >> 4)),
'digit8' / Computed(lambda this: (this.b1 & 15)),
'as_int' / Computed(lambda this: ((((((this.digit8 * 1 + this.digit7 * 10) + this.digit6 * 100) + this.digit5 * 1000) + this.digit4 * 10000) + this.digit3 * 100000) + this.digit2 * 1000000) + this.digit1 * 10000000),
'as_str' / Computed(lambda this: ((((((str(this.digit1) + str(this.digit2)) + str(this.digit3)) + str(this.digit4)) + str(this.digit5)) + str(this.digit6)) + str(this.digit7)) + str(this.digit8)),
'digit1' / Computed(lambda this: (this.b4 & 240) >> 4),
'digit2' / Computed(lambda this: this.b4 & 15),
'digit3' / Computed(lambda this: (this.b3 & 240) >> 4),
'digit4' / Computed(lambda this: this.b3 & 15),
'digit5' / Computed(lambda this: (this.b2 & 240) >> 4),
'digit6' / Computed(lambda this: this.b2 & 15),
'digit7' / Computed(lambda this: (this.b1 & 240) >> 4),
'digit8' / Computed(lambda this: this.b1 & 15),
)

bcd_user_type_le__rtl_obj = Struct(
'b1' / Int8ub,
'b2' / Int8ub,
'b3' / Int8ub,
'b4' / Int8ub,
'as_int' / Computed(lambda this: ((((((((this.digit1 * 1) + (this.digit2 * 10)) + (this.digit3 * 100)) + (this.digit4 * 1000)) + (this.digit5 * 10000)) + (this.digit6 * 100000)) + (this.digit7 * 1000000)) + (this.digit8 * 10000000))),
'as_str' / Computed(lambda this: str(this.digit8) + str(this.digit7) + str(this.digit6) + str(this.digit5) + str(this.digit4) + str(this.digit3) + str(this.digit2) + str(this.digit1)),
'digit1' / Computed(lambda this: ((this.b4 & 240) >> 4)),
'digit2' / Computed(lambda this: (this.b4 & 15)),
'digit3' / Computed(lambda this: ((this.b3 & 240) >> 4)),
'digit4' / Computed(lambda this: (this.b3 & 15)),
'digit5' / Computed(lambda this: ((this.b2 & 240) >> 4)),
'digit6' / Computed(lambda this: (this.b2 & 15)),
'digit7' / Computed(lambda this: ((this.b1 & 240) >> 4)),
'digit8' / Computed(lambda this: (this.b1 & 15)),
'as_int' / Computed(lambda this: ((((((this.digit1 * 1 + this.digit2 * 10) + this.digit3 * 100) + this.digit4 * 1000) + this.digit5 * 10000) + this.digit6 * 100000) + this.digit7 * 1000000) + this.digit8 * 10000000),
'as_str' / Computed(lambda this: ((((((str(this.digit8) + str(this.digit7)) + str(this.digit6)) + str(this.digit5)) + str(this.digit4)) + str(this.digit3)) + str(this.digit2)) + str(this.digit1)),
'digit1' / Computed(lambda this: (this.b4 & 240) >> 4),
'digit2' / Computed(lambda this: this.b4 & 15),
'digit3' / Computed(lambda this: (this.b3 & 240) >> 4),
'digit4' / Computed(lambda this: this.b3 & 15),
'digit5' / Computed(lambda this: (this.b2 & 240) >> 4),
'digit6' / Computed(lambda this: this.b2 & 15),
'digit7' / Computed(lambda this: (this.b1 & 240) >> 4),
'digit8' / Computed(lambda this: this.b1 & 15),
)

bcd_user_type_le = Struct(
Expand Down
2 changes: 1 addition & 1 deletion compiled/construct/debug_enum_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class debug_enum_name__test_subtype__inner_enum2(enum.IntEnum):
debug_enum_name__test_subtype = Struct(
'field1' / Enum(Int8ub, debug_enum_name__test_subtype__inner_enum1),
'field2' / Int8ub,
'instance_field' / Computed(lambda this: KaitaiStream.resolve_enum(DebugEnumName.TestSubtype.InnerEnum2, (this.field2 & 15))),
'instance_field' / Computed(lambda this: KaitaiStream.resolve_enum(DebugEnumName.TestSubtype.InnerEnum2, this.field2 & 15)),
)

debug_enum_name = Struct(
Expand Down
2 changes: 1 addition & 1 deletion compiled/construct/enum_to_i.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class enum_to_i__animal(enum.IntEnum):
'pet_1_eq_int' / Computed(lambda this: int(this.pet_1) == 7),
'pet_1_i' / Computed(lambda this: int(this.pet_1)),
'pet_1_i_to_s' / Computed(lambda this: str(int(this.pet_1))),
'pet_1_mod' / Computed(lambda this: (int(this.pet_1) + 32768)),
'pet_1_mod' / Computed(lambda this: int(this.pet_1) + 32768),
'pet_2_eq_int' / Computed(lambda this: int(this.pet_2) == 5),
)

Expand Down
2 changes: 1 addition & 1 deletion compiled/construct/enum_to_i_invalid.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class enum_to_i_invalid__animal(enum.IntEnum):
'pet_2_eq_int_t' / Computed(lambda this: int(this.pet_2) == 111),
'pet_2_i' / Computed(lambda this: int(this.pet_2)),
'pet_2_i_to_s' / Computed(lambda this: str(int(this.pet_2))),
'pet_2_mod' / Computed(lambda this: (int(this.pet_2) + 32768)),
'pet_2_mod' / Computed(lambda this: int(this.pet_2) + 32768),
)

_schema = enum_to_i_invalid
2 changes: 1 addition & 1 deletion compiled/construct/expr_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
expr_0 = Struct(
'len_of_1' / Int16ul,
'must_be_abc123' / Computed(lambda this: u"abc" + u"123"),
'must_be_f7' / Computed(lambda this: (7 + 240)),
'must_be_f7' / Computed(lambda this: 7 + 240),
)

_schema = expr_0
2 changes: 1 addition & 1 deletion compiled/construct/expr_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
expr_1 = Struct(
'len_of_1' / Int16ul,
'str1' / FixedSized(this.len_of_1_mod, GreedyString(encoding='ASCII')),
'len_of_1_mod' / Computed(lambda this: (this.len_of_1 - 2)),
'len_of_1_mod' / Computed(lambda this: this.len_of_1 - 2),
'str1_len' / Computed(lambda this: len(this.str1)),
)

Expand Down
2 changes: 1 addition & 1 deletion compiled/construct/expr_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'str' / FixedSized(this.len_mod, GreedyString(encoding='UTF-8')),
'rest' / FixedSized(3, LazyBound(lambda: expr_2__tuple)),
'char5' / Pointer(5, FixedSized(1, GreedyString(encoding='ASCII'))),
'len_mod' / Computed(lambda this: (this.len_orig - 3)),
'len_mod' / Computed(lambda this: this.len_orig - 3),
'tuple5' / Pointer(5, LazyBound(lambda: expr_2__tuple)),
)

Expand Down
2 changes: 1 addition & 1 deletion compiled/construct/expr_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
expr_3 = Struct(
'one' / Int8ub,
'two' / FixedSized(3, GreedyString(encoding='ASCII')),
'four' / Computed(lambda this: u"_" + this.two + u"_"),
'four' / Computed(lambda this: (u"_" + this.two) + u"_"),
'is_str_eq' / Computed(lambda this: this.two == u"ACK"),
'is_str_ge' / Computed(lambda this: this.two >= u"ACK2"),
'is_str_gt' / Computed(lambda this: this.two > u"ACK2"),
Expand Down
2 changes: 1 addition & 1 deletion compiled/construct/expr_bytes_non_literal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
expr_bytes_non_literal = Struct(
'one' / Int8ub,
'two' / Int8ub,
'calc_bytes' / Computed(lambda this: struct.pack('2b', this.one, this.two)),
'calc_bytes' / Computed(lambda this: struct.pack('2B', this.one, this.two)),
)

_schema = expr_bytes_non_literal
2 changes: 1 addition & 1 deletion compiled/construct/expr_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class expr_enum__animal(enum.IntEnum):
'one' / Int8ub,
'const_dog' / Computed(lambda this: KaitaiStream.resolve_enum(ExprEnum.Animal, 4)),
'derived_boom' / Computed(lambda this: KaitaiStream.resolve_enum(ExprEnum.Animal, this.one)),
'derived_dog' / Computed(lambda this: KaitaiStream.resolve_enum(ExprEnum.Animal, (this.one - 98))),
'derived_dog' / Computed(lambda this: KaitaiStream.resolve_enum(ExprEnum.Animal, this.one - 98)),
)

_schema = expr_enum
2 changes: 1 addition & 1 deletion compiled/construct/expr_io_pos.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

expr_io_pos__all_plus_number = Struct(
'my_str' / NullTerminated(GreedyString(encoding='UTF-8'), term=b'\x00', include=False, consume=True),
'body' / FixedSized(((stream_size(_io) - stream_tell(_io)) - 2), GreedyBytes),
'body' / FixedSized((stream_size(_io) - stream_tell(_io)) - 2, GreedyBytes),
'number' / Int16ul,
)

Expand Down
8 changes: 4 additions & 4 deletions compiled/construct/expr_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
expr_mod = Struct(
'int_u' / Int32ul,
'int_s' / Int32sl,
'mod_neg_const' / Computed(lambda this: (-9837 % 13)),
'mod_neg_seq' / Computed(lambda this: (this.int_s % 13)),
'mod_pos_const' / Computed(lambda this: (9837 % 13)),
'mod_pos_seq' / Computed(lambda this: (this.int_u % 13)),
'mod_neg_const' / Computed(lambda this: -9837 % 13),
'mod_neg_seq' / Computed(lambda this: this.int_s % 13),
'mod_pos_const' / Computed(lambda this: 9837 % 13),
'mod_pos_seq' / Computed(lambda this: this.int_u % 13),
)

_schema = expr_mod
4 changes: 2 additions & 2 deletions compiled/construct/expr_ops_parens.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
'bool_or' / Computed(lambda this: int( ((not (False)) or (False)) )),
'f_2pi' / Computed(lambda this: 6.28),
'f_e' / Computed(lambda this: 2.72),
'f_sum_to_int' / Computed(lambda this: int((this.f_2pi + this.f_e))),
'f_sum_to_int' / Computed(lambda this: int(this.f_2pi + this.f_e)),
'i_42' / Computed(lambda this: 42),
'i_m13' / Computed(lambda this: -13),
'i_sum_to_str' / Computed(lambda this: str((this.i_42 + this.i_m13))),
'i_sum_to_str' / Computed(lambda this: str(this.i_42 + this.i_m13)),
'str_0_to_4' / Computed(lambda this: u"01234"),
'str_5_to_9' / Computed(lambda this: u"56789"),
'str_concat_len' / Computed(lambda this: len(this.str_0_to_4 + this.str_5_to_9)),
Expand Down
12 changes: 6 additions & 6 deletions compiled/construct/expr_str_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
'one' / FixedSized(5, GreedyString(encoding='ASCII')),
'one_len' / Computed(lambda this: len(this.one)),
'one_rev' / Computed(lambda this: (this.one)[::-1]),
'one_substr_0_to_3' / Computed(lambda this: (this.one)[0:3]),
'one_substr_2_to_5' / Computed(lambda this: (this.one)[2:5]),
'one_substr_3_to_3' / Computed(lambda this: (this.one)[3:3]),
'one_substr_0_to_3' / Computed(lambda this: this.one[0:3]),
'one_substr_2_to_5' / Computed(lambda this: this.one[2:5]),
'one_substr_3_to_3' / Computed(lambda this: this.one[3:3]),
'to_i_attr' / Computed(lambda this: int(u"9173")),
'to_i_r10' / Computed(lambda this: int(u"-072")),
'to_i_r16' / Computed(lambda this: int(u"47cf", 16)),
Expand All @@ -16,9 +16,9 @@
'two' / Computed(lambda this: u"0123456789"),
'two_len' / Computed(lambda this: len(this.two)),
'two_rev' / Computed(lambda this: (this.two)[::-1]),
'two_substr_0_to_10' / Computed(lambda this: (this.two)[0:10]),
'two_substr_0_to_7' / Computed(lambda this: (this.two)[0:7]),
'two_substr_4_to_10' / Computed(lambda this: (this.two)[4:10]),
'two_substr_0_to_10' / Computed(lambda this: this.two[0:10]),
'two_substr_0_to_7' / Computed(lambda this: this.two[0:7]),
'two_substr_4_to_10' / Computed(lambda this: this.two[4:10]),
)

_schema = expr_str_ops
6 changes: 3 additions & 3 deletions compiled/construct/floating_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
'single_value_be' / Float32b,
'double_value_be' / Float64b,
'approximate_value' / Float32l,
'double_value_plus_float' / Computed(lambda this: (this.double_value + 0.05)),
'single_value_plus_float' / Computed(lambda this: (this.single_value + 0.5)),
'single_value_plus_int' / Computed(lambda this: (this.single_value + 1)),
'double_value_plus_float' / Computed(lambda this: this.double_value + 0.05),
'single_value_plus_float' / Computed(lambda this: this.single_value + 0.5),
'single_value_plus_int' / Computed(lambda this: this.single_value + 1),
)

_schema = floating_points
2 changes: 1 addition & 1 deletion compiled/construct/if_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

if_values__code = Struct(
'opcode' / Int8ub,
'half_opcode' / If((this.opcode % 2) == 0, Computed(lambda this: this.opcode // 2)),
'half_opcode' / If(this.opcode % 2 == 0, Computed(lambda this: this.opcode // 2)),
)

if_values = Struct(
Expand Down
4 changes: 2 additions & 2 deletions compiled/construct/js_signed_right_shift.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from construct.lib import *

js_signed_right_shift = Struct(
'should_be_40000000' / Computed(lambda this: (2147483648 >> 1)),
'should_be_a00000' / Computed(lambda this: (2684354560 >> 8)),
'should_be_40000000' / Computed(lambda this: 2147483648 >> 1),
'should_be_a00000' / Computed(lambda this: 2684354560 >> 8),
)

_schema = js_signed_right_shift
10 changes: 0 additions & 10 deletions compiled/construct/nav_parent_recursive.py

This file was deleted.

10 changes: 0 additions & 10 deletions compiled/construct/nav_root_recursive.py

This file was deleted.

2 changes: 1 addition & 1 deletion compiled/construct/nested_same_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
)

nested_same_name__main__foo_obj = Struct(
'data' / FixedSized((this._.main_size * 2), GreedyBytes),
'data' / FixedSized(this._.main_size * 2, GreedyBytes),
)

nested_same_name__main = Struct(
Expand Down
4 changes: 2 additions & 2 deletions compiled/construct/nested_same_name2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from construct.lib import *

nested_same_name2__dummy_obj__foo_obj = Struct(
'data2' / FixedSized((this._.dummy_size * 2), GreedyBytes),
'data2' / FixedSized(this._.dummy_size * 2, GreedyBytes),
)

nested_same_name2__dummy_obj = Struct(
Expand All @@ -11,7 +11,7 @@
)

nested_same_name2__main__foo_obj = Struct(
'data1' / FixedSized((this._.main_size * 2), GreedyBytes),
'data1' / FixedSized(this._.main_size * 2, GreedyBytes),
)

nested_same_name2__main = Struct(
Expand Down
10 changes: 0 additions & 10 deletions compiled/construct/nested_types_import.py

This file was deleted.

Loading

0 comments on commit 17d1e51

Please sign in to comment.