private int processFileBlocks(SquashedFile squashedFile, SquashBasicFileInode fileInode,
			OutputStream os, TaskMonitor monitor) throws CancelledException, IOException {
		int[] blockSizes = fileInode.getBlockSizes();

		// Location of starting block
		long location = fileInode.getStartBlockOffset();

		int blockUncompressedBytes = 0;

		// Handle the primary bytes of the file
		for (int blockSizeHeader : blockSizes) {

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

			// Set the monitor's progress
			monitor.setProgress(blockUncompressedBytes);

			// Extract data from the block size header
			boolean isCompressed =
				(blockSizeHeader & SquashConstants.DATABLOCK_COMPRESSED_MASK) == 0;
			long size = blockSizeHeader & ~SquashConstants.DATABLOCK_COMPRESSED_MASK;

			// If we encounter a block with size zero, we write a full block of zeros to the output
			if (size <= 0) {

				// Write all zeroes for the given blockSize
				size = superBlock.getBlockSize();
				os.write(new byte[(int) size]);

				// Increment the progress
				blockUncompressedBytes += size;
				continue;
			}

			// Set the reader to read from the block start location
			reader.setPointerIndex(location);

			// Move location to the start of the next block for next iteration
			location += size;

			byte[] buffer = null;

			// Check for compression
			if (isCompressed) {
				buffer = SquashUtils.decompressBytes(reader, (int) size,
					superBlock.getCompressionType(), monitor);
			}
			else {
				buffer = reader.readNextByteArray((int) size);
			}

			// Write to the output and increment progress
			os.write(buffer);
			blockUncompressedBytes += buffer.length;
		}

		return blockUncompressedBytes;
	}
Decompress (if needed) all data block associated with the given file and write to OutputStream
@param squashedFile The file to process
@param fileInode The inode associated with the file
@param os The stream to write to
@param monitor The monitor to keep track of the progress with
@return The number of uncompressed bytes the blocks used
@throws CancelledException The user cancelled the file read
@throws IOException Any read error
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/squashfs/SquashFileSystem.java