def peek_bits_as_bin_string(self, bits=0):
        if bits == 0:
            bits = len(self._data) * 8
        bpb = BitPackedBuffer([], self._bigendian)
        bpb.copy(self)
        return ('{:0%ib}'%bits).format(bpb.read_bits(bits))
dataset/ETHPy150Open karlgluck/heroes-of-the-storm-replay-parser/s2protocol/decoders.py/BitPackedBuffer.peek_bits_as_bin_string/original