code: def getsz(self, addr):
          
          i = 0
          try:
              while True:
                  if self._buf[addr+i] == 0:
                      break
                  i += 1
          except KeyError:
              raise NotEnoughDataError(msg=('Bad access at 0x%X: '
                  'not enough data to read zero-terminated string') % addr)
          return self.gets(addr, i)
docs: Get zero-terminated bytes string from given address. Will raise
          NotEnoughDataError exception if a hole is encountered before a 0.