Mathematica provides high-performance reading and writing of binary data, to both files and pipes. A convenient symbolic format representation makes it straightforward to translate published instrumentation or logging specifications to a form that can immediately be used in
Mathematica.
BinaryRead — read one binary object or block of objects
BinaryReadList — repeatedly read a binary object or block of objects
BinaryWrite — write a sequence of binary objects with specified types
Import,
Export — import, export complete binary files
"Bit" — individual binary bits (
Import,
Export only)
"Byte" — 8-bit unsigned integer
"Integer8",
"Integer16",
... — 8-, 16-, 24- 32-, 64-, 128-bit signed integers
"UnsignedInteger8",
... — 8-, 16-, 24-, 32-, 64-, 128-bit unsigned integers
"Real32",
"Real64",
"Real128" — IEEE single-, double-, quad-precision real numbers
"Character8",
"Character16" — 8- and 16-bit (Unicode) characters
"TerminatedString" — null-terminated string
ByteOrdering — option for byte ordering (+1 for big endian; -1 for little endian)
$ByteOrdering — native byte ordering on your computer system
Compress,
Uncompress — convert expressions to and from compressed strings