def graph6n(data):
    if data[0] <= 62:
        return data[0], data[1:]
    return (data[1]<<12) + (data[2]<<6) + data[3], data[4:]
Read initial one or four-unit value from graph6 sequence.  
dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/readwrite/sparsegraph6.py/graph6n