gzip.decompress(s) in Python Last Updated : 26 Mar, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of gzip.decompress(s) method, we can decompress the compressed bytes of string into original string by using gzip.decompress(s) method. Syntax : gzip.decompress(string) Return : Return decompressed string. Example #1 : In this example we can see that by using gzip.decompress(s) method, we are able to decompress the compressed string in the byte format of string by using this method. Python3 1=1 # import gzip and decompress import gzip s = b'This is GFG author, and final year student.' s = gzip.compress(s) # using gzip.decompress(s) method t = gzip.decompress(s) print(t) Output : b'This is GFG author, and final year student.' Example #2 : Python3 1=1 # import gzip and compress import gzip s = b'GeeksForGeeks@12345678' s = gzip.compress(s) # using gzip.decompress(s) method t = gzip.decompress(s) print(t) Output : b'GeeksForGeeks@12345678' Comment More infoAdvertise with us Next Article gzip.decompress(s) in Python J jitender_1998 Follow Improve Article Tags : Python Python-gzip Practice Tags : python Similar Reads gzip.compress(s) in Python With the help of gzip.compress(s) method, we can get compress the bytes of string by using gzip.compress(s) method. Syntax : gzip.compress(string) Return : Return compressed string. Example #1 : In this example we can see that by using gzip.compress(s) method, we are able to compress the string in t 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 zlib.decompress(s) in Python With the help of zlib.decompress(s) method, we can decompress the compressed bytes of string into original string by using zlib.decompress(s) method. Syntax : zlib.decompress(string) Return : Return decompressed string. Example #1 : In this example we can see that by using zlib.decompress(s) method, 1 min read bz2.compress(s) in Python With the help of bz2.compress(s) method, we can get compress the bytes of string by using bz2.compress(s) method. Syntax : bz2.compress(string) Return : Return compressed string. Example #1 : In this example we can see that by using bz2.compress(s) method, we are able to compress the string in the b 1 min read zlib.compress(s) in python With the help of zlib.compress(s) method, we can get compress the bytes of string by using zlib.compress(s) method. Syntax : zlib.compress(string) Return : Return compressed string. Example #1 : In this example we can see that by using zlib.compress(s) method, we are able to compress the string in t 1 min read Like