from pathlib import Path
from typing import List


def search_all_files(directory: Path) -> List[Path]:
    """
    Search all compressed files in a directory

    Args:
        directory (Path): Directory to search.

    Returns:
        List[Path]: List of files ending in .gz in search directory.
    """
    dirpath = Path(directory)
    assert(dirpath.is_dir())
    file_list = []
    for file in dirpath.iterdir():
        if file.is_file() and file.suffix == ".gz":
            file_list.append(file)
        else:
            continue

    return file_list