I am working with Python3.2. I need to take a hex stream as an input and parse it at bit-level. So I used
bytes.fromhex(input_str)
to convert t
I think simplest would be use numpy here. For example you can read a file as bytes and then expand it to bits easily like this:
numpy
Bytes = numpy.fromfile(filename, dtype = "uint8") Bits = numpy.unpackbits(Bytes)