def read(self, num=1):
        """Read one or more bits from the stream.

        Multi-bit reads are returns as reading the least significant bit
        first.
        """
        out = 0
        for i in xrange(num):
            out |= self._next() << i
        return out
Read one or more bits from the stream.

        Multi-bit reads are returns as reading the least significant bit
        first.
        
tools/compress_memory_initializer.py