Binary patterns
Binary patterns take apart a Bytes value field by field, the way Erlang and Gleam do. They work on JavaScript and the BEAM.
Encode a tiny header with Bytes.Encode, then match it with << ... >>. Segments default to unsigned 8-bit ints; add sizes like :16 after a colon. A case on bytes always needs a _ branch. Try changing the version byte.