What is base64.a85decode in Python?

Base64https://riptutorial.com/python/topic/8678/the-base64-module coding refers to encoding data from binary to text. This translates binary data to a radix-64 format in order to represent binary data in an ASCII string format.

There are many methods that are part of the Python base64 module. base64.a85decode is one of the methods of the base64 library. We use a85decode to decode an a85encoded binary string into its normal form using Ascii85 alphabets.

Syntax

base64.a85decode(b, foldspaces=False, adobe=False, ignorechars=b'\t\n\r\v')	 
  1. b: A bytes-like object.

  2. foldspaces: If True, the 4 consecutive spaces will be replaced by a character y.

  3. adobe: If True, the encoded string is written in between <~ and ~>.

  4. ignorechars: The characters to be ignored in the encoding process.

The parameters do not have a significant impact when False.

Code

import base64
# Data
data = "Welcome to Educative"
print("data:", data)
# converting the data to bytes-form
data_bytes = data.encode("UTF-8")
# perform the a85 encode function
result = base64.a85encode(data_bytes)
# set adobe to True
result1 = base64.a85encode(data_bytes, adobe = True)
print("a85encoded: ", result)
print("with adobe", result1)
## We can use a85decode function to decode.
# reverse of string with adobe set to False.
result2 = base64.a85decode(result)
print("a85decoded: ", result2)
# reverse of string with adobe set to True.
result3 = base64.a85decode(result1, adobe = True)
print("a85decoded: ", result3)
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved