code: def check_archive_format (format, compression):
      
      if format not in ArchiveFormats:
          raise util.PatoolError("unknown archive format `%s'" % format)
      if compression is not None and compression not in ArchiveCompressions:
          raise util.PatoolError("unkonwn archive compression `%s'" % compression)
docs: Make sure format and compression is known.