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

Method read_long

src/docx/image/helpers.py:35–44  ·  view source on GitHub ↗

Return the int value of the four bytes at the file position defined by self._base_offset + `base` + `offset`. If `base` is None, the long is read from the current position in the stream. The endian setting of this instance is used to interpret the byte layout of the

(self, base, offset=0)

Source from the content-addressed store, hash-verified

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
37 self._base_offset + `base` + `offset`.
38
39 If `base` is None, the long is read from the current position in the stream. The
40 endian setting of this instance is used to interpret the byte layout of the
41 long.
42 """
43 fmt = "<L" if self._byte_order is LITTLE_ENDIAN else ">L"
44 return self._read_int(fmt, base, offset)
45
46 def read_short(self, base, offset=0):
47 """Return the int value of the two bytes at the file position determined by

Callers 9

from_streamMethod · 0.95
_iter_chunk_offsetsMethod · 0.80
from_offsetMethod · 0.80
from_offsetMethod · 0.80
parseMethod · 0.80
from_streamMethod · 0.80
_parse_valueMethod · 0.80
_parse_valueMethod · 0.80
it_can_read_a_longMethod · 0.80

Calls 1

_read_intMethod · 0.95

Tested by 1

it_can_read_a_longMethod · 0.64