BinaryData
Obtains a binary data object from an object.
Syntax

BinaryData(X)

X
is any compatible object

Description
If X
is any compatible object, then BinaryData(X)
returns the binary data object containing the raw binary data behind X
.
The following list of compatible data types describes the binary representation of an object of each type. All arrays are packed (that is, no padding between elements).

integers
64bit signed integer, little endian.

rational numbers
An array of two 64bit signed integers: the numerator and the denominator.

real numbers
Either an 80bit extended precision or a 64bit double precision floatingpoint number.

complex numbers
An array of two real numbers: the real part and the imaginary part.

strings
UTF16 LE

booleans
A single byte, either
0x00
(false
) or0x01
(true
). 
real vector
An array of real numbers.

complex vector
An array of complex numbers.

real matrix
An array of real numbers in rowmajor order.

complex matrix
An array of complex numbers in rowmajor order.

colours
An array of the red, green, blue, and alpha components as 64bit doubleprecision floatingpoint numbers.

pixmaps
An array of pixels, each pixel being a 32bit
0xAABBGGRR
value, in rowmajor order. 
sounds
An array of samples. The sample rate and the bit depth both depend on the audio and can be queried using the
AudioMetadata
function. 
binary data objects
Raw bytes.