Back to index

python3.2  3.2.2
Classes | Functions
encodings.zlib_codec Namespace Reference

Classes

class  Codec
class  IncrementalEncoder
class  IncrementalDecoder
class  StreamWriter
class  StreamReader

Functions

def zlib_encode
 Codec APIs.
def zlib_decode
def getregentry

Detailed Description

Python 'zlib_codec' Codec - zlib compression encoding.

This codec de/encodes from bytes to bytes and is therefore usable with
bytes.transform() and bytes.untransform().

Written by Marc-Andre Lemburg (mal@lemburg.com).

Function Documentation

Definition at line 68 of file zlib_codec.py.

00068 
00069 def getregentry():
00070     return codecs.CodecInfo(
00071         name='zlib',
00072         encode=zlib_encode,
00073         decode=zlib_decode,
00074         incrementalencoder=IncrementalEncoder,
00075         incrementaldecoder=IncrementalDecoder,
00076         streamreader=StreamReader,
00077         streamwriter=StreamWriter,
00078     )
def encodings.zlib_codec.zlib_decode (   input,
  errors = 'strict' 
)

Definition at line 18 of file zlib_codec.py.

00018 
00019 def zlib_decode(input, errors='strict'):
00020     assert errors == 'strict'
00021     return (zlib.decompress(input), len(input))

Here is the caller graph for this function:

def encodings.zlib_codec.zlib_encode (   input,
  errors = 'strict' 
)

Codec APIs.

Definition at line 14 of file zlib_codec.py.

00014 
00015 def zlib_encode(input, errors='strict'):
00016     assert errors == 'strict'
00017     return (zlib.compress(input), len(input))

Here is the caller graph for this function: