def pack_code(rep):
    """
    Encodes symbolic Morse repr as binary
    >>> pack_code("--.---")
    (0b111011, 6)
    >>> pack_code("-.")
    (0b10, 2)
    """
    
    return (sum((1 if c == '-' else 0) << i for i, c in enumerate(rep)), len(rep))