• Home
  • Raw
  • Download

Lines Matching refs:codecs

4 import codecs, sys
8 encode = codecs.utf_32_encode
11 return codecs.utf_32_decode(input, errors, True)
13 class IncrementalEncoder(codecs.IncrementalEncoder):
15 codecs.IncrementalEncoder.__init__(self, errors)
20 result = codecs.utf_32_encode(input, self.errors)[0]
22 self.encoder = codecs.utf_32_le_encode
24 self.encoder = codecs.utf_32_be_encode
29 codecs.IncrementalEncoder.reset(self)
44 self.encoder = codecs.utf_32_le_encode
46 self.encoder = codecs.utf_32_be_encode
48 class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
50 codecs.BufferedIncrementalDecoder.__init__(self, errors)
56 codecs.utf_32_ex_decode(input, errors, 0, final)
58 self.decoder = codecs.utf_32_le_decode
60 self.decoder = codecs.utf_32_be_decode
67 codecs.BufferedIncrementalDecoder.reset(self)
73 state = codecs.BufferedIncrementalDecoder.getstate(self)[0]
81 (self.decoder is codecs.utf_32_be_decode))
86 codecs.BufferedIncrementalDecoder.setstate(self, state)
89 self.decoder = (codecs.utf_32_be_decode
91 else codecs.utf_32_le_decode)
93 self.decoder = (codecs.utf_32_le_decode
95 else codecs.utf_32_be_decode)
99 class StreamWriter(codecs.StreamWriter):
102 codecs.StreamWriter.__init__(self, stream, errors)
105 codecs.StreamWriter.reset(self)
110 result = codecs.utf_32_encode(input, errors)
112 self.encoder = codecs.utf_32_le_encode
114 self.encoder = codecs.utf_32_be_encode
119 class StreamReader(codecs.StreamReader):
122 codecs.StreamReader.reset(self)
130 codecs.utf_32_ex_decode(input, errors, 0, False)
132 self.decode = codecs.utf_32_le_decode
134 self.decode = codecs.utf_32_be_decode
142 return codecs.CodecInfo(