@Override
	protected boolean readNextChunk() throws IOException {
		byte[] compressedBytes = new byte[DEFAULT_BUFFER_SIZE];
		byte[] decompressedBytes = null;

		// Reset the current chunk and offset
		currentChunk = null;
		chunkPos = 0;

		if (inflater == null || inflater.finished()) {
			return false;
		}

		if (inflater.needsInput()) {
			int bytesRead = delegate.read(compressedBytes);

			if (bytesRead <= 0) {
				return false;
			}

			inflater.setInput(compressedBytes, 0, bytesRead);
		}

		try {
			decompressedBytes = new byte[DEFAULT_BUFFER_SIZE];
			int bytesDecompressed = inflater.inflate(decompressedBytes);

			if (bytesDecompressed <= 0) {
				return false;
			}

			currentChunk = Arrays.copyOf(decompressedBytes, bytesDecompressed);
		}
		catch (DataFormatException e) {
			throw new IOException("CaRT decompression failed: " + e.getMessage());
		}

		return currentChunk != null && currentChunk.length > 0;

	}
Read the next chunk in the stream and decompress

@return True if more data is now available, False otherwise.
@throws IOException If there is a read failure of the data
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/cart/CartV1StreamDecompressor.java