MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __read

Method __read

tools/python-3.11.9-amd64/Lib/tarfile.py:558–572  ·  view source on GitHub ↗

Return size bytes from stream. If internal buffer is empty, read another block from the stream.

(self, size)

Source from the content-addressed store, hash-verified

556 return t[:size]
557
558 def __read(self, size):
559 """Return size bytes from stream. If internal buffer is empty,
560 read another block from the stream.
561 """
562 c = len(self.buf)
563 t = [self.buf]
564 while c < size:
565 buf = self.fileobj.read(self.bufsize)
566 if not buf:
567 break
568 t.append(buf)
569 c += len(buf)
570 t = b"".join(t)
571 self.buf = t[size:]
572 return t[:size]
573# class _Stream
574
575class _StreamProxy(object):

Callers 2

_init_read_gzMethod · 0.95
_readMethod · 0.95

Calls 3

readMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected