Zlib,bz2 and Gzip compression in Python..

Zlib compression and Decompression in Python

a=”ASDADASDASDASDASD”

import zlib
c = zlib.compress(a)

#to decompress

d=zlib.decompress(c)

//Bz2 Compression and Decompression in Python

import bz2
c =bz2.compress(a)

#to decompress

d=bz2.decompress(c)

This entry was posted on Thursday, July 31st, 2008 at 2:11 am and is filed under Python. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Post a Comment