import base64


def b64_decode(value: bytes) -> bytes:
    """
    URL safe base 64 decoding of a value
    :param value: bytes
    :return: bytes
    """
    pad = b"=" * (-len(value) % 4)
    return base64.urlsafe_b64decode(value + pad)