Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Visualize the contents of binary data
ResourceFunction["ByteArrayPlot"][bytes] visualizes the binary data in a ByteArray bytes. | |
ResourceFunction["ByteArrayPlot"]["file"] reads the contents of "file" into a ByteArray for visualization. | |
ResourceFunction["ByteArrayPlot"][expr] equivalent to ByteArrayPlot[BinarySerialize[expr]]. | |
ResourceFunction["ByteArrayPlot"][expr,n] visualizes up to n bytes of expr. |
Use the function:
In[1]:= | ![]() |
Out[1]= | ![]() |
Retrieve the ResourceFunction:
In[2]:= | ![]() |
Out[2]= | ![]() |
Retrieve the ResourceObject:
In[3]:= | ![]() |
Out[3]= | ![]() |
When the content is PrintableASCIIQ, it will appear as plain text:
In[4]:= | ![]() |
Out[4]= | ![]() |
In[5]:= | ![]() |
Out[5]= | ![]() |
When content is mixed, the non-printable bytes are rendered as color-coded hex values:
In[6]:= | ![]() |
Out[6]= | ![]() |
In[7]:= | ![]() |
Out[8]= | ![]() |
Visualize the binary data contained in a file:
In[9]:= | ![]() |
Out[9]= | ![]() |
Only view the first 10 bytes:
In[10]:= | ![]() |
Out[10]= | ![]() |
View the contents of a CloudObject:
In[11]:= | ![]() |
Out[11]= | ![]() |
In[12]:= | ![]() |
Out[12]= | ![]() |
In[13]:= | ![]() |
Out[13]= | ![]() |
View the bytes of the WXF format directly:
In[14]:= | ![]() |
Out[14]= | ![]() |
Compare binary formats:
In[15]:= | ![]() |
Out[15]= | ![]() |
In[16]:= | ![]() |
Out[16]= | ![]() |
In[17]:= | ![]() |
Out[17]= | ![]() |
In[18]:= | ![]() |
Out[18]= | ![]() |
Packed arrays are aptly named:
In[19]:= | ![]() |
In[20]:= | ![]() |
Out[20]= | ![]() |
In[21]:= | ![]() |
Out[21]= | ![]() |
In[22]:= | ![]() |
Out[22]= | ![]() |
In[23]:= | ![]() |
Out[23]= | ![]() |
By default, only the first 1024 bytes are shown:
In[24]:= | ![]() |
Out[24]= | ![]() |
Use the second argument to view more:
In[25]:= | ![]() |
Out[25]= | ![]() |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License