def decrementing_pattern(size: int) -> bytes:
    """
    Return `size` bytes with a pattern of decrementing byte values.
    """
    ret = bytearray(size)
    for i in range(size - 1, -1, -1):
        ret[i] = i & 0xff
    return bytes(ret)