def METHOD_NAME(root_dir: str, folder_name: str) -> bytes:
    """Compresses a directory and return the bytes value of it.
    Args:
        root_dir: root path that contains the folder to be zipped
        folder_name: path to the folder to be zipped, relative to root_dir
    """
    bio = io.BytesIO()
    _zip_directory(root_dir, folder_name, bio)
    return bio.getvalue()