Python-LZO provides Python bindings for the LZO data compression library. You can access the LZO library from your Python scripts thereby compressing ordinary Python strings. LZO is a portable lossless data compression library written in ANSI C. It offers pretty fast compression and *very* fast decompression. Decompression requires no memory. In addition there are slower compression levels achieving a quite competitive compression ratio while still decompressing at this very high speed.
Pysync has both a demonstration implementation of the rsync and related algorithms in pure Python, and a high speed librsync Python extension. The pure Python is not fast and is not optimized, however it does work and provides a simple implementation of the algorithm for reference and experimentation. It includes a combination of ideas taken from librsync, xdelta, and rsync. The librsync Python extension is less flexible and harder to understand, but is very fast.
Fivebit is a Python 3 compression library for short text strings. It compresses short strings of text into five bit encoding, which yields a 37.5% reduction for lowercase ASCII. There is also a dictionary for the 1024 most common English words (3 letters or longer). Punctuation, digits, and normal symbols will usually take up 10 bits each, and oddball Unicode characters will take up more space again.