compress string of data

Gerrit Holl gerrit at nl.linux.org
Sun Jan 25 15:49:25 CET 2004


> How i could compress string of data?.

>>> import zlib
>>> zlib.compress("Hello, world")
'x\x9c\xf3H\xcd\xc9\xc9\xd7Q(\xcf/\xcaI\x01\x00\x1b\xd4\x04i'

http://www.python.org/doc/current/lib/module-zlib.html

Gerrit.




More information about the Python-list mailing list