Static Public Attributes

Detailed Description

Member Function Documentation

Decodes the object input and returns a tuple (output
object, length consumed).
input must be an object which provides the bf_getreadbuf
buffer slot. Python strings, buffer objects and memory
mapped files are examples of objects providing this slot.
errors defines the error handling to apply. It defaults to
'strict' handling.
The method may not store state in the Codec instance. Use
StreamCodec for codecs which have to keep state in order to
make encoding/decoding efficient.
The decoder must be able to handle zero length input and
return an empty object of the output object type in this
situation.

0013500136 def decode(self, input, errors='strict'):
00137
00138 """ Decodes the object input and returns a tuple (output00139 object, length consumed).00140 00141 input must be an object which provides the bf_getreadbuf00142 buffer slot. Python strings, buffer objects and memory00143 mapped files are examples of objects providing this slot.00144 00145 errors defines the error handling to apply. It defaults to00146 'strict' handling.00147 00148 The method may not store state in the Codec instance. Use00149 StreamCodec for codecs which have to keep state in order to00150 make encoding/decoding efficient.00151 00152 The decoder must be able to handle zero length input and00153 return an empty object of the output object type in this00154 situation.00155 00156 """00157 raise NotImplementedError

Encodes the object input and returns a tuple (output
object, length consumed).
errors defines the error handling to apply. It defaults to
'strict' handling.
The method may not store state in the Codec instance. Use
StreamCodec for codecs which have to keep state in order to
make encoding/decoding efficient.
The encoder must be able to handle zero length input and
return an empty object of the output object type in this
situation.

0011600117 def encode(self, input, errors='strict'):
00118
00119 """ Encodes the object input and returns a tuple (output00120 object, length consumed).00121 00122 errors defines the error handling to apply. It defaults to00123 'strict' handling.00124 00125 The method may not store state in the Codec instance. Use00126 StreamCodec for codecs which have to keep state in order to00127 make encoding/decoding efficient.00128 00129 The encoder must be able to handle zero length input and00130 return an empty object of the output object type in this00131 situation.00132 00133 """00134 raise NotImplementedError