ExportByteArray

Listing of Formats »

ExportByteArray[expr,"format"]

generates a ByteArray object corresponding to expr exported in the specified format.

ExportByteArray[exprs,elems]

generates a ByteArray object by treating exprs as elements specified by elems.

Details

Examples

open allclose all

Basic Examples  (2)

Export an image as a ByteArray object:

Import the bytes to produce the original image:

Export an image as a ByteArray object:

Write the bytes to a temporary file:

Verify the bytes were correctly written by importing the file:

Scope  (2)

Export a typeset mathematical formula as a ByteArray object:

Import the bytes to produce a resolution-independent version of the formula:

Export a color map and corresponding raw data as a ByteArray object:

Import the bytes to produce the original animated GIF image:

Applications  (2)

Store an integer into a ByteArray:

Retrieve the number from the byte array:

Store a big number into a "Base64" encoded ByteArray:

Retrieve the number from the byte array:

Verify the result:

Properties & Relations  (3)

ExportByteArray returns the same result as ExportString followed by StringToByteArray:

ExportByteArray returns the same result as Export followed by ReadByteArray:

If the export produces no data, an empty byte array is returned:

Wolfram Research (2017), ExportByteArray, Wolfram Language function, https://reference.wolfram.com/language/ref/ExportByteArray.html.

Text

Wolfram Research (2017), ExportByteArray, Wolfram Language function, https://reference.wolfram.com/language/ref/ExportByteArray.html.

CMS

Wolfram Language. 2017. "ExportByteArray." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ExportByteArray.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_exportbytearray, author="Wolfram Research", title="{ExportByteArray}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/ExportByteArray.html}", note=[Accessed: 06-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_exportbytearray, organization={Wolfram Research}, title={ExportByteArray}, year={2017}, url={https://reference.wolfram.com/language/ref/ExportByteArray.html}, note=[Accessed: 06-November-2024 ]}