docs: def open(self, name, mode="r", pwd=None):
          """Return file-like object for 'name'."""
          if mode not in ("r", "U", "rU"):
              raise RuntimeError('open() requires mode "r", "U", or "rU"')
          if 'U' in mode:
              import warnings
              warnings.warn("'U' mode is deprecated",
                            DeprecationWarning, 2)
          if pwd and not isinstance(pwd, bytes):
              raise TypeError("pwd: expected bytes, got %s" % type(pwd))
          if not self.fp:
              raise RuntimeError(
                  "Attempt to read ZIP archive that was already closed")
  
          # Make sure we have an info object
          if isinstance(name, ZipInfo):
              # 'name' is already an info object
              zinfo = name
          else:
              # Get info object for name
              zinfo = self.getinfo(name)
  
          self._fileRefCnt += 1
  
          zef_file = _SharedFile(
              self.fp, zinfo.header_offset, self._fpclose, self._lock)
  
          try:
              # Skip the file header:
              fheader = zef_file.read(sizeFileHeader)
  
              if len(fheader) != sizeFileHeader:
                  raise BadZipFile("Truncated file header")
  
              fheader = struct.unpack(structFileHeader, fheader)
              # print(fheader)
  
              if fheader[_FH_SIGNATURE] != stringFileHeader:
                  raise BadZipFile("Bad magic number for file header")
  
              # 注意：头部的文件长度可能会被修改
              len_fname = fheader[_FH_FILENAME_LENGTH]
              if len_fname > 256:
                  # 自动修正文件名长度，但是，不能保证解压成功
                  len_fname = len(zinfo.orig_filename)
  
              fname = zef_file.read(len_fname)
  
              if fheader[_FH_EXTRA_FIELD_LENGTH]:
                  zef_file.read(fheader[_FH_EXTRA_FIELD_LENGTH])
  
              # zinfo.flag_bits ^= zinfo.flag_bits % 2
  
              if zinfo.flag_bits & 0x20:
                  # Zip 2.7: compressed patched data
                  raise NotImplementedError(
                      "compressed patched data (flag bit 5)")
  
              if zinfo.flag_bits & 0x40:
                  # strong encryption
                  raise NotImplementedError("strong encryption (flag bit 6)")
  
              if zinfo.flag_bits & 0x800:
                  # UTF-8 filename
                  fname_str = fname.decode("utf-8")
              else:
                  fname_str = fname.decode("cp437")
  
              if fname_str != zinfo.orig_filename:
                  raise BadZipFile(
                      'File name in directory %r and header %r differ.'
                      % (zinfo.orig_filename, fname))
  
              return ZipExtFile(zef_file, mode, zinfo, None, True)
          except Exception as ignore:
              zef_file.close()
              raise