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

Method read_byte

src/docx/image/helpers.py:26–33  ·  view source on GitHub ↗

Return the int value of the byte at the file position defined by self._base_offset + `base` + `offset`. If `base` is None, the byte is read from the current position in the stream.

(self, base, offset=0)

Source from the content-addressed store, hash-verified

24 return self._stream.read(count)
25
26 def read_byte(self, base, offset=0):
27 """Return the int value of the byte at the file position defined by
28 self._base_offset + `base` + `offset`.
29
30 If `base` is None, the byte is read from the current position in the stream.
31 """
32 fmt = "B"
33 return self._read_int(fmt, base, offset)
34
35 def read_long(self, base, offset=0):
36 """Return the int value of the four bytes at the file position defined by

Callers 2

from_offsetMethod · 0.80
from_streamMethod · 0.80

Calls 1

_read_intMethod · 0.95

Tested by

no test coverage detected