BinaryRead

BinaryRead[stream]

reads one byte of raw binary data from an input stream, and returns an integer from 0 to 255.

BinaryRead[stream,type]

reads an object of the specified type.

BinaryRead[stream,{type1,type2,}]

reads a sequence of objects of the specified types.

Details and Options

Examples

open allclose all

Basic Examples  (1)

Create a file with a sequence of bytes:

Read the first byte from the file:

Read the second byte as an 8-bit character:

Read the next byte as an 8-bit signed integer:

Close the file:

Scope  (1)

Read bytes from the file specified using File object:

Wolfram Research (2004), BinaryRead, Wolfram Language function, https://reference.wolfram.com/language/ref/BinaryRead.html (updated 2019).

Text

Wolfram Research (2004), BinaryRead, Wolfram Language function, https://reference.wolfram.com/language/ref/BinaryRead.html (updated 2019).

CMS

Wolfram Language. 2004. "BinaryRead." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/BinaryRead.html.

APA

Wolfram Language. (2004). BinaryRead. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BinaryRead.html

BibTeX

@misc{reference.wolfram_2024_binaryread, author="Wolfram Research", title="{BinaryRead}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/BinaryRead.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_binaryread, organization={Wolfram Research}, title={BinaryRead}, year={2019}, url={https://reference.wolfram.com/language/ref/BinaryRead.html}, note=[Accessed: 22-December-2024 ]}