MCPcopy Index your code
hub / github.com/RustPython/RustPython / z85decode

Function z85decode

Lib/base64.py:515–525  ·  view source on GitHub ↗

Decode the z85-encoded bytes-like object or ASCII string b The result is returned as a bytes object.

(s)

Source from the content-addressed store, hash-verified

513 return b85encode(s).translate(_z85_encode_translation)
514
515def z85decode(s):
516 """Decode the z85-encoded bytes-like object or ASCII string b
517
518 The result is returned as a bytes object.
519 """
520 s = _bytes_from_decode_data(s)
521 s = s.translate(_z85_decode_translation)
522 try:
523 return b85decode(s)
524 except ValueError as e:
525 raise ValueError(e.args[0].replace('base85', 'z85')) from None
526
527# Legacy interface. This code could be cleaned up since I don't believe
528# binascii has any line length limitations. It just doesn't seem worth it

Callers

nothing calls this directly

Calls 4

_bytes_from_decode_dataFunction · 0.85
b85decodeFunction · 0.85
translateMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected