bitio.py
def readbits(self, n):
        '''Reads n bits and returns them packed into an integer.
        The first bit read will be the most significant of these n bits.'''
        v = 0
        while n > 0:
            v = (v << 1) | self.readbit()
            n -= 1
        return v
Reads n bits and returns them packed into an integer.
        The first bit read will be the most significant of these n bits.
Reads n bits and returns them packed into an integer.
The first bit read will be the most significant of these n bits.
Reads n bits and returns them packed into an integer . The first bit read will be the most significant of these n bits .
def readbits(self, n):
        v = 0
        while n > 0:
            v = (v << 1) | self.readbit()
            n -= 1
        return v
def readbits ( self , n ) : v = 0 while n > 0 : v = ( v << 1 ) | self . readbit ( ) n -= 1 return v
Reads n bits and returns them packed into an integer.
Reads n bits and returns them packed into an integer .
'''Reads n bits and returns them packed into an integer.
        The first bit read will be the most significant of these n bits.'''
self
n