MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _readmark

Method _readmark

tools/python-3.11.9-amd64/Lib/aifc.py:527–545  ·  view source on GitHub ↗
(self, chunk)

Source from the content-addressed store, hash-verified

525 self._compname = b'not compressed'
526
527 def _readmark(self, chunk):
528 nmarkers = _read_short(chunk)
529 # Some files appear to contain invalid counts.
530 # Cope with this by testing for EOF.
531 try:
532 for i in range(nmarkers):
533 id = _read_short(chunk)
534 pos = _read_long(chunk)
535 name = _read_string(chunk)
536 if pos or name:
537 # some files appear to have
538 # dummy markers consisting of
539 # a position 0 and name ''
540 self._markers.append((id, pos, name))
541 except EOFError:
542 w = ('Warning: MARK chunk contains only %s marker%s instead of %s' %
543 (len(self._markers), '' if len(self._markers) == 1 else 's',
544 nmarkers))
545 warnings.warn(w)
546
547class Aifc_write:
548 # Variables used in this class:

Callers 1

initfpMethod · 0.95

Calls 5

_read_shortFunction · 0.85
_read_longFunction · 0.85
_read_stringFunction · 0.85
appendMethod · 0.45
warnMethod · 0.45

Tested by

no test coverage detected