summaryrefslogtreecommitdiff
path: root/kombu/compression.py
Commit message (Collapse)AuthorAgeFilesLines
* flakesAsk Solem2014-04-151-1/+1
|
* don't convert decompressed data into utf-8 stringAdam Gaca2014-04-151-1/+1
|
* WordingAsk Solem2013-10-011-1/+1
|
* Copyright 2012 is VMware, inc.Ask Solem2012-11-221-3/+0
|
* dict.keys is uselessAsk Solem2012-08-051-1/+1
|
* Use single quotesAsk Solem2012-06-151-4/+4
|
* Handle binary bodies in compression.Steeve Morin2012-02-081-2/+4
|
* Updates copyright years to include 2012Ask Solem2012-01-061-1/+1
|
* Adds __all__ to modulesAsk Solem2011-09-091-0/+3
|
* 2.0-devel: No longer supports Python 2.4Ask Solem2011-09-071-0/+2
|
* Update copyright headers to include 2011Ask Solem2011-01-311-1/+1
|
* The bz2 module does not exist on JythonAsk Solem2011-01-231-4/+8
|
* Unit tests now passing on Python 3Ask Solem2010-12-031-6/+8
|
* Improved reference documentationAsk Solem2010-10-271-0/+38
|
* Added support for automatic compression/decompression of messages.Ask Solem2010-07-311-0/+35
This is done by adding the "compression" header to messages. Currently supported compression formats are: zlib and bzip2. Custom compression formats can be added using kombu.compression.register:: >>> compression.register(encoder, decoder, content_type, aliases={}) e.g.:: >>> compression.register(lambda x: x.encode("zlib"), ... lambda x: x.decode("zlib"), ... "application/x-zlib", ... aliases=["zlib", "gzip"]) To enable compression you use the ``compression`` argument to :meth:`Producer.publish`. When these messages are then consumed by kombu they will be automatically decompressed, other clients need to decompress them manually by looking at the ``compression`` header. Example using zlib compression: >>> producer.publish(message, serializer="json", compression="zlib") Example using bzip2 compression: >>> producer.publish(message, serializer="json", compression="bz2")