I\'m making a python \"script\" that sends a string to a webservice (in C#). I NEED to compress or compact this string, because the bandwidth and MBs data is LIMITED (yeah, in c
How about zlib?
import zlib a = "this string needs compressing" a = zlib.compress(a) print zlib.decompress(a) #outputs original contents of a
You can also use sys.getsizeof(obj) to see how much data an object takes up before and after compression.
sys.getsizeof(obj)