Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Convert a list of bits to a byte array
ResourceFunction["BitListToByteArray"][bits] converts the list bits to a ByteArray. |
Create a list of bits:
In[1]:= |
Out[1]= |
Convert to a byte array:
In[2]:= |
Out[2]= |
Compare the number of bytes needed to represent the expressions:
In[3]:= |
Out[3]= |
For larger bit arrays the relative memory compression does approach a factor of 64:
In[4]:= |
Out[6]= |
This work is licensed under a Creative Commons Attribution 4.0 International License