Chapter 7Binaries and the Bit Syntax
A binary is a data structure designed for storing large quantities of raw data in a space-efficient manner. The Erlang VM is optimized for the efficient input, output, and message passing of binaries.
Binaries should be used whenever possible for storing the contents of large quantities of unstructured data, for example large strings or the contents of files.
In most circumstances, the number of bits in a binary will be exactly divisible by 8 and thus corresponds to a sequence of bytes. If the number of bits is not exactly divisible by 8, we use the name bitstring to refer to the data. When we say bitstring, it is to emphasize the fact that the number of bits in the data is not an exact multiple of 8. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access