def get_mask(size: int) -> int:
    """
    Get bit mask based on byte size.

    :param size: number of bytes to obtain mask for

    :return: mask of width size
    """
    return (1 << (8 * size)) - 1