docs: def _readbin(self, length, start):
          """Read bits and interpret as a binary string."""
          if not length:
              return ''
          # Get the byte slice containing our bit slice
          startbyte, startoffset = divmod(start + self._offset, 8)
          endbyte = (start + self._offset + length - 1) // 8
          b = self._datastore.getbyteslice(startbyte, endbyte + 1)
          # Convert to a string of '0' and '1's (via a hex string an and int!)
          try:
              c = "{:0{}b}".format(int(binascii.hexlify(b), 16), 8*len(b))
          except TypeError:
              # Hack to get Python 2.6 working
              c = "{0:0{1}b}".format(int(binascii.hexlify(str(b)), 16), 8*len(b))
          # Finally chop off any extra bits.
          return c[startoffset:startoffset + length]