I have a file where the first byte contains encoded information. In Matlab I can read the byte bit by bit with var = fread(file, 8, 'ubit1'), and then retrieve each bit by var(1), var(2), etc.
var = fread(file, 8, 'ubit1')
var(1), var(2)
Is there any equivalent bit reader in python?