MCPcopy Index your code
hub / github.com/python/cpython / load_bytearray8

Method load_bytearray8

Lib/pickle.py:1525–1537  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1523 dispatch[BINBYTES8[0]] = load_binbytes8
1524
1525 def load_bytearray8(self):
1526 size, = unpack('<Q', self.read(8))
1527 if size > maxsize:
1528 raise UnpicklingError("BYTEARRAY8 exceeds system's maximum size "
1529 "of %d bytes" % maxsize)
1530 cursize = min(size, _MIN_READ_BUF_SIZE)
1531 b = bytearray(cursize)
1532 if self.readinto(b) == cursize:
1533 while cursize < size and len(b) == cursize:
1534 delta = min(cursize, size - cursize)
1535 b += self.read(delta)
1536 cursize += delta
1537 self.append(b)
1538 dispatch[BYTEARRAY8[0]] = load_bytearray8
1539
1540 def load_next_buffer(self):

Callers

nothing calls this directly

Calls 4

UnpicklingErrorClass · 0.85
readMethod · 0.45
readintoMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected