public static InputStream getDecompressionStream(InputStream is, int compressionType)
			throws IOException {

		// Based on the supplied compression type, return the appropriate type of CompressorInputStream
		switch (compressionType) {
			case SquashConstants.COMPRESSION_TYPE_GZIP:
				return new DeflateCompressorInputStream(is);
			case SquashConstants.COMPRESSION_TYPE_LZMA:
				LZMAInputStream lzmaIn = new LZMAInputStream(is);
				lzmaIn.enableRelaxedEndCondition();
				return lzmaIn;
			case SquashConstants.COMPRESSION_TYPE_LZO:
				throw new IOException("LZO compression is not supported");
			case SquashConstants.COMPRESSION_TYPE_XZ:
				return new XZCompressorInputStream(is);
			case SquashConstants.COMPRESSION_TYPE_LZ4:
				return new BlockLZ4CompressorInputStream(is);
			case SquashConstants.COMPRESSION_TYPE_ZSTD:
				throw new IOException("ZSTD compression is not supported");
			default:
				throw new IOException("Supplied compression type (code: " + compressionType +
					") was not recognized. ");
		}
	}
Convert the given InputStream into the appropriate decompression InputStream for the data
@param is InputStream containing the compressed source bytes
@param compressionType The type of compression the archive uses
@return An appropriate decompression InputStream for the data
@throws IOException Conversion failed (likely due to unsupported compression algorithm)
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/squashfs/SquashUtils.java