base64.decodestring(s) in Python Last Updated : 22 Apr, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of base64.decodestring(s) method, we can decode the binary string with the help of base64 data into normal form. Syntax : base64.decodestring(b_string) Return : Return the decoded string. Example #1 : In this example we can see that by using base64.decodestring(s) method, we are able to get the decoded string which can be in binary form by using this method. Python3 1=1 # import base64 from base64 import encodestring from base64 import decodestring s = b'GeeksForGeeks' s = encodestring(s) # Using base64.decodestring(s) method gfg = decodestring(s) print(gfg) Output : b'GeeksForGeeks' Example #2 : Python3 1=1 # import base64 from base64 import encodestring from base64 import decodestring s = b'Hello World' s = encodestring(s) # Using base64.decodestring(s) method gfg = decodestring(s) print(gfg) Output : b'Hello World' Comment More infoAdvertise with us Next Article base64.decodebytes(s) in Python J jitender_1998 Follow Improve Article Tags : Python Python base64-module Practice Tags : python Similar Reads base64.encodestring(s) in Python With the help of base64.encodestring(s) method, we can encode the string using base64 encoded data into the binary form. Syntax : base64.encodestring(string) Return : Return the encoded string. Example #1 : In this example we can see that by using base64.encodestring(s) method, we are able to get th 1 min read base64.decodebytes(s) in Python With the help of base64.decodebytes(s) method, we can decode the binary string with the help of base64 data into normal form. Syntax : base64.decodebytes(b_string) Return : Return the decoded string. Example #1 : In this example we can see that by using base64.decodebytes(s) method, we are able to g 1 min read base64.encodebytes(s) in Python With the help of base64.encodebytes(s) method, we can encode the string using base64 encoded data into the binary form. Syntax : base64.encodebytes(string) Return : Return the encoded string. Example #1 : In this example we can see that by using base64.encodebytes(s) method, we are able to get the e 1 min read Encoding and Decoding Base64 Strings in Python The Base64 encoding is used to convert bytes that have binary or text data into ASCII characters. Encoding prevents the data from getting corrupted when it is transferred or processed through a text-only system. In this article, we will discuss about Base64 encoding and decoding and its uses to enco 4 min read base64.b64decode() in Python With the help of base64.b64decode() method, we can decode the binary string into normal form. Syntax : base64.b64decode(b_string) Return : Return the decoded string. Example #1 : In this example we can see that by using base64.b64decode() method, we are able to get the decoded string which can be in 1 min read bz2.decompress(s) in Python With the help of bz2.decompress(s) method, we can decompress the compressed bytes of string into original string by using bz2.decompress(s) method. Syntax : bz2.decompress(string) Return : Return decompressed string. Example #1 : In this example we can see that by using bz2.decompress(s) method, we 1 min read Like