class Example: magic_str: nommy.string(8) some_unsigned_byte: nommy.le_u8 some_unsigned_16bit: nommy.le_u16 some_flag: nommy.flag next_flag: nommy.flag six_bit_unsigned: nommy.le_u(6) ...
class DNSRecord: magic: string(None) rtype: DNSRType foo: string(None)
class Person: first_name: string(None) last_name: string(None)
class Header: magic: string(8) some_type: Type other_type: OtherType person_ct: le_u8
class Body: subject: string(None) text: string(None)
class Header: id: le_u8 recipient: string(None) sender: string(None)
class Example: header: string(4) name: string(5) some_byte: le_u8
class StringTypes: static_len: string(4) nullterm: string(None) pascal: pascal_string
class PascalString: magic: string(2) first_name: pascal_string last_name: pascal_string
class NullTermString: magic: string(4) first_name: string(None) last_name: string(None)
class Flags: magic: string(2) flag1: flag flag2: flag flag3: flag flag4: flag
class JustString: name: string(12)
class Message: header: Header string_ct: le_u8 strings: repeating(string(None), 'string_ct') payloads: repeating(Payload, 'header.payload_ct')
class Payload: name: string(None)
class HasRepeats: name_ct: le_u8 names: repeating(string(None), 'name_ct') struct_ct: le_u8 structs: repeating(SomeStruct, 'struct_ct') labels: repeating_until_null(string(4))