Warning: This is the manual of the legacy Guile 2.0 series. You may want to read the manual of the current stable series instead.
Next: Bytevector Manipulation, Up: Bytevectors [Contents][Index]
Some of the following procedures take an endianness parameter. The endianness is defined as the order of bytes in multi-byte numbers: numbers encoded in big endian have their most significant bytes written first, whereas numbers encoded in little endian have their least significant bytes first8.
Little-endian is the native endianness of the IA32 architecture and
its derivatives, while big-endian is native to SPARC and PowerPC,
among others. The native-endianness
procedure returns the
native endianness of the machine it runs on.
Return a value denoting the native endianness of the host machine.
Return an object denoting the endianness specified by symbol. If
symbol is neither big
nor little
then an error is
raised at expand-time.
The objects denoting big- and little-endianness, respectively.
Big-endian and little-endian are the most common “endiannesses”, but others do exist. For instance, the GNU MP library allows word order to be specified independently of byte order (see Integer Import and Export in The GNU Multiple Precision Arithmetic Library Manual).