The support for VxWorks is deprecated as of OTP 22, and will be removed in OTP 23.
The old legacy
This module contains functions for encoding Erlang terms into a sequence of bytes, and for decoding Erlang terms from a sequence of bytes.
Compares two encoded terms.
Returns
These functions return the number of bytes written to buffer
on success, otherwise
Notice that no bounds checking is done on the buffer. It is
the caller's responsibility to ensure that the buffer is
large enough to hold the encoded terms. You can either use a
static buffer that is large enough to hold the terms you expect
to need in your program, or use
The following can help you estimate the buffer
requirements for a term. Notice that this information is
implementation-specific, and can change in future versions.
If you are unsure, use
Erlang terms are encoded with a 1 byte tag that identifies the type of object, a 2- or 4-byte length field, and then the data itself. Specifically:
The total space required is the result calculated from the information above, plus 1 more byte for a version identifier.
Returns the number of elements in an encoded term.
Identifies and returns the type of Erlang term encoded in a buffer. It skips a trailing magic identifier.
Returns
This function is used for stepping over one or more encoded terms in a buffer, to directly access later term.
Returns a pointer to a subterm that can be
used in a later call to
Determines the buffer space that would be
needed by
Returns the size in bytes.