May 2018
Intermediate to advanced
412 pages
9h 3m
English
The first rule of binaries is “if in doubt, specify the type of each field.” Available types are binary, bits, bitstring, bytes, float, integer, utf8, utf16, and utf32. You can also add qualifiers:
Use hyphens to separate multiple attributes for a field:
| | << length::unsigned-integer-size(12), flags::bitstring-size(4) >> = data |
However, unless you’re doing a lot of work with binary file or protocol formats, the most common use of all this scary stuff is to process UTF-8 strings.
When we process lists, we use patterns that split the ...
Read now
Unlock full access