[types]
type key  written as                       example
drawing   an order and width, then segments  lsb 8: _[5] count[2:0]
hex       hex digits, no prefix            6e000c00
int       decimal digits                   736
list      words separated by single spaces  four-2.00 n-2.20
name      one word naming a section        classic-slot-g1
shape     a shape word and its arguments   u7le 5 u32
template  wire bytes and typed holes       64 13
text      the cell as written              ZOOM G Series

[segments]
form key     meaning
0 1 1010     constant bits
?name        a kept bit whose meaning is open
_ _[n]       kept bits
name         one bit, logical bit 0 of its field
name=101     a named field pinned to a constant
name[hi:lo]  a slice of a field's logical bits

[shapes]
word key    arguments                       meaning
at          N SHAPE..                       a shape that must start at hex byte offset N
bits        NAME|drawing                    a named or inline drawing
bits7       N W                             N values of W bits in one stream over 7-bit carriers
bytes       N                               N raw bytes
choice      HEX..                           one of these single bytes
chunks      TAG[:SHAPE] TAG? .. [to HEX..]  a tag-length stream in this order, `?` optional; `to` ends it where those bytes stand in a tag's place
cstring     N ascii|latin1|sjis|utf8        text ending at its first NUL, which it holds, in at most N bytes
f32le       -                               a 32-bit float, low byte first
filename    N                               a file-service name: NUL-terminated on ZD2, zero-padded to N on classic MS
format      NAME                            another format, embedded
keep        N|rest                          bytes kept exactly
literal     HEX..                           bytes that must be these; `HH*N` repeats one
repeat      SHAPE.. COUNT                   a shape COUNT times; COUNT a number, a field or `image.COLUMN`, of the image's row in images.txt
rest        -                               everything to the end
septets     lsb|msb|family LEN              LEN bytes packed seven in eight; family takes the image's ZDL order
text        N ascii|latin1|sjis|utf8 nul|space  a fixed text field and its padding
u16be       -                               a 16-bit integer, high byte first
u16le       -                               a 16-bit integer, low byte first
u32le       -                               a 32-bit integer, low byte first
u7          -                               one 7-bit byte
u7bytes     N                               N 7-bit bytes
u7le        N [u32|i32]                     N 7-bit groups, least significant first, narrowed
u8          -                               one byte
widths      NAME                            each of a drawing's fields' bit count as a u32le, in the order the fields sit

[functions]
function key  arguments  value
active       part       how many of a repeated part's slots hold an effect
byte_len     part       the byte length of a part, or `self`
count        part       how many items a repeated part holds
distance     from..to   the bytes from the start of one part to the start of another
jamcrc32     from..to   the JAMCRC-32 of the bytes from the start of one part to the end of another
same         part       the same bytes as an earlier part
shown        part       the last active slot's position plus one, at least one

[keys]
kind key     key key       cells             many  meaning
bits         drawing       text..            yes   the segments; rows join in order
bits         note          text              yes   a caveat
bits         order         text              no    lsb or msb
bits         width         int               no    bits in the drawing
format       either        list@format       no    the format is whichever of these applies
format       found         -                 no    it is searched for anywhere in a file, not read at a position
format       length        text              no    the byte count bounding this format: a number, or the part holding it
format       note          text              yes   a caveat
format       packing       name@bits         no    the packing a frame carries it in
format       part          text shape        yes   a named part, in order; `-` for an unnamed one
format       standalone    -                 no    it travels in a frame of its own
format       when          text text         no    a field and the value it must hold for this format to apply
