code: def readall_fast(stm, size):
      
      buf, offset = stm.read_fast(size)
      if len(buf) - offset < size:
          # slow case
          buf = buf[offset:]
          buf += stm.recv(size - len(buf))
          return buf, 0
      return buf, offset
docs: Slightly faster version of readall, it reads no more than two chunks.
      Meaning that it can only be used to read small data that doesn't span
      more that two packets.
  
      :param stm: Stream to read from, should have read method.
      :param size: Number of bytes to read.
      :return: