def compress_multiple_pdfs(source_directory, output_directory, ghostscript_binary):
source_paths = _get_pdf_filenames_at(source_directory)<EOL>yield len(source_paths)<EOL>for source_path in source_paths:<EOL><INDENT>output = os.path.join(output_directory, os.path.basename(source_path))<EOL>compress_pdf(source_path, output, ghostscript_binary)<EOL>yield output<EOL><DEDENT>
Compress all PDF files in the current directory and place the output in the
    given output directory. This is a generator function that first yields the amount
    of files to be compressed, and then yields the output path of each file.

    Args:
        source_directory (str): Filepath to the source directory.
        output_directory (str): Filepath to the output directory.
        ghostscript_binary (str): Name of the Ghostscript binary.

    Returns:
        list(str): paths to outputs.