private BinaryReader decompressDirectoryTable(BinaryReader reader, long endAddress,
			int compressionType, TaskMonitor monitor) throws IOException, CancelledException {

		ByteArrayOutputStream bos = new ByteArrayOutputStream();

		// Keep track of how many bytes result from decompression
		int totalUncompressedBytes = 0;

		long directoryTableStart = reader.getPointerIndex();

		// Continue reading until the end of the section is reached
		while (reader.getPointerIndex() < endAddress) {

			// Check if the user cancelled the load
			monitor.checkCancelled();

			long startOfBlockOffset = reader.getPointerIndex() - directoryTableStart;

			// Decompress the current metablock
			byte[] bytes = SquashUtils.decompressBlock(reader, compressionType, monitor);
			bos.write(bytes);

			archiveToReaderOffsets.put(startOfBlockOffset, (long) totalUncompressedBytes);
			totalUncompressedBytes += bytes.length;
		}

		// Convert the output stream into a BinaryReader and return
		return SquashUtils.byteArrayToReader(bos.toByteArray());
	}
Decompress the directory table and log block positions
@param reader The BinaryReader pointed to the start of the section
@param endAddress The address the section ends at
@param compressionType The compression type if the archive
@param monitor Monitor to allow the user to cancel the load
@return A BinaryReader containing ONLY the uncompressed bytes of the section
@throws IOException Any read operation failure
@throws CancelledException Archive load was cancelled
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/squashfs/SquashDirectoryTable.java