Home | Trees | Indices | Help |
---|
|
object --+ | PagingEncoder
UNTESTED. Handles encoding of multiple chunks or streams of encodable data, separated with control codes. Dual of PagingDecoder.
Instance Methods | |||
|
|||
|
|||
Inherited from |
Properties | |
Inherited from |
Method Details |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
Given an iterator of iterators of bytes, produces a single iterator containing a delimited sequence of independantly compressed LZW sequences, all beginning on a byte-aligned spot, all beginning with a CLEAR code and all terminated with an END_OF_INFORMATION code (and zero to seven trailing junk bits.) The dual of PagingDecoder.decodepages >>> import lzw >>> enc = lzw.PagingEncoder(257, 2**12) >>> coded = enc.encodepages([ "say hammer yo hammer mc hammer go hammer", ... "and the rest can go and play", ... "can't touch this" ]) ... >>> b"".join(coded) '\x80\x1c\xcc\'\x91\x01\xa0\xc2m6\x99NB\x03\xc9\xbe\x0b\x07\x84\xc2\xcd\xa68|"\x14 3\xc3\xa0\xd1c\x94\x02\x02\x80\x18M\xc6A\x01\xd0\xd0e\x10\x1c\x8c\xa73\xa0\x80\xc7\x02\x10\x19\xcd\xe2\x08\x14\x10\xe0l0\x9e`\x10\x10\x80\x18\xcc&\xe19\xd0@t7\x9dLf\x889\xa0\xd2s\x80@@' |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Apr 20 15:25:48 2010 | http://epydoc.sourceforge.net |