def compression(path):
    """
    Based on filename, is compression being used?
    """
    compress = None
    ext = path.suffix
    if ext == ".gz":
        compress = True
    elif ext == ".dil":
        compress = False
    else:
        raise Exception(f"invalid file extension [{ext}], must be .dil or .dil.gz")

    return compress