import re


def extract_jxl_cs(stderr: bytes) -> str:
    """ Extracts compression speed from a cjxl output

    :param stderr: Console output
    :return: Compression speed, in MP/s
    """

    # Find decoding speed in the output pool
    ds = re.findall(r"\d+.\d+ MP/s", str(stderr))[1][:-5]
    return ds