private void processRawChunk(int blocks, TaskMonitor monitor)
			throws IOException, CancelledException {
		long length = (long) blocks * blockSize;
		while (length > 0) {
			monitor.checkCancelled();
			int bytesToRead = (int) Math.min(length, bufferSize);
			byte[] bytes = reader.readNextByteArray(bytesToRead);
			crc.update(bytes);
			tempFos.write(bytes);
			length = length - bytesToRead;
		}
	}
Writes a chunk of blocks that are read from the source file.

@param blocks number of blocks to copy
@param monitor {@link TaskMonitor} to monitor
@throws IOException if error when reading or writing
@throws CancelledException if user cancels
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/sparseimage/SparseImageDecompressor.java