For what purpose do you want to work with “lists of bits”? It’s likely that there’s a better way that avoids having such a data structure at all, and if you write more about your use case, I might be able to suggest one.
The purpose is to process each pixel of the XBM image file format. This format stores a list of bytes containing information about eight pixels. Each pixel represents either white (0) or black (1).
Currently, I'm using bitwise operations to convert between 8 pixels and a byte. It would be a bit useful to have a function for this purpose. However, if there are no functions for the purpose, the current conversion methods using bitwise operations are fine.