private InputStream decompressedInputStream(File inputFile) throws IOException {
        return switch (type) {
            case compressed -> switch (compressionType) {
                case gzip -> new GZIPInputStream(new FileInputStream(inputFile));
                case lz4 -> new LZ4BlockInputStream(new FileInputStream(inputFile));
                case none -> new FileInputStream(inputFile);
                case zstd -> new ZstdInputStream(new FileInputStream(inputFile));
            };
            case file -> new FileInputStream(inputFile);
        };
    }
Utility class for compressing and decompressing files used in a file reference

@author hmusum
filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceCompressor.java