BinaryDeserialize[ByteArray[…]]
recovers an expression from a binary representation generated by BinarySerialize.
BinaryDeserialize[ByteArray[…],h]
wraps h around the expression produced before returning it.
BinaryDeserialize
BinaryDeserialize[ByteArray[…]]
recovers an expression from a binary representation generated by BinarySerialize.
BinaryDeserialize[ByteArray[…],h]
wraps h around the expression produced before returning it.
Details
- BinaryDeserialize[ByteArray[…]] gives $Failed if the byte array was not one that could have been generated from an expression by BinarySerialize.
Examples
open all close allBasic Examples (2)
Scope (3)
Serialize a general expression:
bin = BinarySerialize[Solve[α x + β y == γ && β x - y == η, {x, y}]]BinaryDeserialize[bin]Serialize an unevaluated expression:
bin = BinarySerialize[Unevaluated[1 + 1]]Deserialize it and keep it held:
BinaryDeserialize[bin, Hold]Receive a serialized expression from an unknown source:
data = ByteArray["NzpmAXMOQmlnQmFkRnVuY3Rpb25TCmVyYXNlIGRpc2s="]Wrap the result in HoldComplete to prevent unexpected evaluation:
BinaryDeserialize[data, HoldComplete]Properties & Relations (1)
Serialized data from files should be read in using binary-mode functions such as BinaryReadList:
data = ReadByteArray["ExampleData/atoms.wxf"]BinaryDeserialize[%]History
Text
Wolfram Research (2017), BinaryDeserialize, Wolfram Language function, https://reference.wolfram.com/language/ref/BinaryDeserialize.html.
CMS
Wolfram Language. 2017. "BinaryDeserialize." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BinaryDeserialize.html.
APA
Wolfram Language. (2017). BinaryDeserialize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BinaryDeserialize.html
BibTeX
@misc{reference.wolfram_2026_binarydeserialize, author="Wolfram Research", title="{BinaryDeserialize}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/BinaryDeserialize.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_binarydeserialize, organization={Wolfram Research}, title={BinaryDeserialize}, year={2017}, url={https://reference.wolfram.com/language/ref/BinaryDeserialize.html}, note=[Accessed: 13-June-2026]}