From b8d4bd38e343488b5e8539f913650b150cab3ade Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= The complete specification for the bit syntax appears in the
+ In Erlang, a Bin is used for constructing binaries and matching
binary patterns. A Bin is written with the following syntax:
separated by hyphens.
Here,
Since Erlang R12B, a Bin does not need to consist of a whole number of bytes.
+A Bin does not need to consist of a whole number of bytes.
A bitstring is a sequence of zero or more bits, where
the number of bits does not need to be divisible by 8. If the number
@@ -184,7 +184,7 @@ end.]]>
Example:
@@ -322,21 +322,15 @@ foo(<Since Erlang R12B, the following function for creating a binary out of - a list of triples of integers is efficient:
+Appending to a binary in an efficient way can be done as follows:
triples_to_bin(T, <<>>).
triples_to_bin([{X,Y,Z} | T], Acc) ->
- triples_to_bin(T, <>); % inefficient before R12B
+ triples_to_bin(T, <>);
triples_to_bin([], Acc) ->
Acc.]]>
- In previous releases, this function was highly inefficient, because
- the binary constructed so far (