'Compact deserialization.
:param bytes compact:'

@classmethod
def from_compact(cls, compact):

    try:
        (protected, payload, signature) = compact.split('.')
    except ValueError:
        raise errors.DeserializationError('Compact    JWS    serialization    should    comprise    of    exactly    3    dot-separated    components')
    sig = cls.signature_cls(protected=b64.b64decode(protected).decode('utf-8'), signature=b64.b64decode(signature))
    return cls(payload=b64.b64decode(payload), signatures=(sig,))
