(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False)
return result
Encode bytes-like object b using Ascii85 and return a bytes object.

    foldspaces is an optional flag that uses the special short sequence 'y'
    instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This
    feature is not supported by the "standard" Adobe encoding.

    wrapcol controls whether the output should have newline (b'\\n') characters
    added to it. If this is non-zero, each output line will be at most this
    many characters long.

    pad controls whether the input is padded to a multiple of 4 before
    encoding. Note that the btoa implementation always pads.

    adobe controls whether the encoded byte sequence is framed with <~ and ~>,
    which is used by the Adobe implementation.
Encode bytes-like object b using Ascii85 and return a bytes object.
Encode bytes - like object b using Ascii85 and return a bytes object .
def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False):
    """Encode bytes-like object b using Ascii85 and return a bytes object.

    foldspaces is an optional flag that uses the special short sequence 'y'
    instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This
    feature is not supported by the "standard" Adobe encoding.

    wrapcol controls whether the output should have newline (b'\\n') characters
    added to it. If this is non-zero, each output line will be at most this
    many characters long.

    pad controls whether the input is padded to a multiple of 4 before
    encoding. Note that the btoa implementation always pads.

    adobe controls whether the encoded byte sequence is framed with <~ and ~>,
    which is used by the Adobe implementation.
    """
    global _a85chars, _a85chars2
    # Delay the initialization of tables to not waste memory
    # if the function is never called
    if _a85chars2 is None:
        _a85chars = [bytes((i,)) for i in range(33, 118)]
        _a85chars2 = [(a + b) for a in _a85chars for b in _a85chars]

    result = _85encode(b, _a85chars, _a85chars2, pad, True, foldspaces)

    if adobe:
        result = _A85START + result
    if wrapcol:
        wrapcol = max(2 if adobe else 1, wrapcol)
        chunks = [result[i: i + wrapcol]
                  for i in range(0, len(result), wrapcol)]
        if adobe:
            if len(chunks[-1]) + 2 > wrapcol:
                chunks.append(b'')
        result = b'\n'.join(chunks)
    if adobe:
        result += _A85END

    return result
def a85encode ( b , * , foldspaces = False , wrapcol = 0 , pad = False , adobe = False ) : global _a85chars , _a85chars2 # Delay the initialization of tables to not waste memory # if the function is never called if _a85chars2 is None : _a85chars = [ bytes ( ( i , ) ) for i in range ( 33 , 118 ) ] _a85chars2 = [ ( a + b ) for a in _a85chars for b in _a85chars ] result = _85encode ( b , _a85chars , _a85chars2 , pad , True , foldspaces ) if adobe : result = _A85START + result if wrapcol : wrapcol = max ( 2 if adobe else 1 , wrapcol ) chunks = [ result [ i : i + wrapcol ] for i in range ( 0 , len ( result ) , wrapcol ) ] if adobe : if len ( chunks [ - 1 ] ) + 2 > wrapcol : chunks . append ( b'' ) result = b'\n' . join ( chunks ) if adobe : result += _A85END return result