in reply to Bytes to bits
You might want to lookup the working of vec, that may very well do what you want to do.
Abigail