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

Method iter_chunks

src/docx/image/png.py:143–148  ·  view source on GitHub ↗

Generate a |_Chunk| subclass instance for each chunk in this parser's PNG stream, in the order encountered in the stream.

(self)

Source from the content-addressed store, hash-verified

141 return cls(stream_rdr)
142
143 def iter_chunks(self):
144 """Generate a |_Chunk| subclass instance for each chunk in this parser's PNG
145 stream, in the order encountered in the stream."""
146 for chunk_type, offset in self._iter_chunk_offsets():
147 chunk = _ChunkFactory(chunk_type, self._stream_rdr, offset)
148 yield chunk
149
150 def _iter_chunk_offsets(self):
151 """Generate a (chunk_type, chunk_offset) 2-tuple for each of the chunks in the

Calls 2

_iter_chunk_offsetsMethod · 0.95
_ChunkFactoryFunction · 0.85