MCPcopy Index your code
hub / github.com/python-openxml/python-docx / _read_bytes

Method _read_bytes

src/docx/image/helpers.py:73–78  ·  view source on GitHub ↗
(self, byte_count, base, offset)

Source from the content-addressed store, hash-verified

71 return self._stream.tell()
72
73 def _read_bytes(self, byte_count, base, offset):
74 self.seek(base, offset)
75 bytes_ = self._stream.read(byte_count)
76 if len(bytes_) < byte_count:
77 raise UnexpectedEndOfFileError
78 return bytes_
79
80 def _read_int(self, fmt, base, offset):
81 struct = Struct(fmt)

Callers 1

_unpack_itemMethod · 0.95

Calls 2

seekMethod · 0.95
readMethod · 0.80

Tested by

no test coverage detected