public static CoffArchiveHeader read(ByteProvider provider, TaskMonitor monitor)
			throws CoffException, IOException {
		if (!isMatch(provider)) {
			return null;
		}
		BinaryReader reader = new BinaryReader(provider, false/*does not really matter*/);

		reader.setPointerIndex(CoffArchiveConstants.MAGIC_LEN);
		int memberNum = 0;

		CoffArchiveHeader cah = new CoffArchiveHeader();

		long eofPos = reader.length() - CoffArchiveMemberHeader.CAMH_MIN_SIZE;

		while (reader.getPointerIndex() < eofPos) {
			if (monitor.isCancelled()) {
				break;
			}

			try {
				CoffArchiveMemberHeader camh =
					CoffArchiveMemberHeader.read(reader, cah._longNameMember);

				if (camh.getName().equals(CoffArchiveMemberHeader.SLASH)) {
					switch (memberNum) {
						case 0:
							cah._firstLinkerMember = new FirstLinkerMember(reader, camh, true);
							break;
						case 1:
							cah._secondLinkerMember = new SecondLinkerMember(reader, camh, true);
							break;
						default:
							throw new CoffException(
								"Invalid COFF: multiple 1st and 2nd linker members detected.");
					}
				}
				else if (camh.getName().equals(CoffArchiveMemberHeader.SLASH_SLASH)) {
					if (cah._longNameMember == null) {
						cah._longNameMember = new LongNamesMember(reader, camh);
					}
					else {
						throw new CoffException(
							"Invalid COFF: multiple long name members detected.");
					}
				}
				cah._memberHeaders.add(camh);
				memberNum++;

				reader.setPointerIndex(camh.getPayloadOffset() + camh.getSize());
			}
			catch (IOException e) {
				// if we run into bad data, return partial success if there has been at least some
				// good ones, otherwise propagate the exception upwards
				if (memberNum <= 3) {
					throw e;
				}
				Msg.warn(CoffArchiveMemberHeader.class, "Problem reading COFF archive headers in " +
					provider.getFSRL() + ", only " + memberNum + " members found.", e);
				break;
			}
		}

		// TODO: check for null terminators in the longname string table vs. \n terminators
		cah.isMS = (cah._firstLinkerMember != null && cah._secondLinkerMember != null &&
			cah._longNameMember != null);

		return cah;
	}
Reads and parses the headers and meta-data in a COFF Archive file.
<p>
Returns a {@link CoffArchiveHeader} that has a list of the 
{@link CoffArchiveMemberHeader members} in the archive.

@param provider
@param monitor
@return
@throws CoffException
@throws IOException
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/coff/archive/CoffArchiveHeader.java