decode
Decode a v1 preamble body, refusing anything else with a named HelloFormatException.
The checks run in wire order and each one precedes the read it protects, because these are the first bytes a remote sends: magic (compared over however many bytes arrived, so a short foreign frame is still named as foreign), a body too short to hold the version, the version, a body too short for the header, idLen against the remaining body, an empty id, and finally a strict UTF-8 decode — an invalid sequence is refused, never folded onto U+FFFD, since two distinct byte strings must not resolve to one id. The flags field is read past, never checked.