Lines Matching defs:decode

29            "encode", "decode", "iterencode", "iterdecode",
94 def __new__(cls, encode, decode, streamreader=None, streamwriter=None,
97 self = tuple.__new__(cls, (encode, decode, streamreader, streamwriter))
100 self.decode = decode
118 The .encode()/.decode() methods may use different error
157 def decode(self, input, errors='strict'):
257 be passed piece by piece to the decode() method. The IncrementalDecoder
258 remembers the state of the decoding process between calls to decode().
270 def decode(self, input, final=False):
287 were passed to decode() that have not yet been converted.
311 # undecoded input that is kept between calls to decode()
315 # Overwrite this method in subclasses: It must decode input
319 def decode(self, input, final=False):
320 # decode input (taking the buffer into account)
448 def decode(self, input, errors='strict'):
463 -1 indicates to read and decode as much as possible. size
464 is intended to prevent having to decode huge files in one
499 # decode bytes (those remaining from the last call included)
504 newchars, decodedbytes = self.decode(data, self.errors)
508 self.decode(data[:exc.start], self.errors)
763 intermediate format (depending on the "decode" codec) and then
775 def __init__(self, stream, encode, decode, Reader, Writer,
779 conversion: encode and decode work on the frontend (the
788 encode and decode must adhere to the Codec interface; Reader and
798 self.decode = decode
836 data, bytesdecoded = self.decode(data, self.errors)
842 data, bytesdecoded = self.decode(data, self.errors)
949 sr = StreamRecoder(file, data_info.encode, data_info.decode,
976 return lookup(encoding).decode
1055 output = decoder.decode(input)
1058 output = decoder.decode(b"", True)