def _base64ify(data, chunksize=None):

    if chunksize is None:
        chunksize = _base64_chunksize
    b64 = data.encode('base64_codec')
    b64 = b64.replace('\n', '')
    l = len(b64)
    if l > chunksize:
        chunks = []
        i = 0
        while i < l:
            chunks.append(b64[i : i + chunksize])
            i += chunksize
        b64 = ' '.join(chunks)
    return b64
Convert a binary string into its base64 encoding, broken up into chunks
dataset/ETHPy150Open catap/namebench/nb_third_party/dns/rdata.py/_base64ify