Lines Matching refs:codecs
7 import codecs
11 class Codec(codecs.Codec):
13 return codecs.charmap_encode(input,errors,encoding_map)
16 return codecs.charmap_decode(input,errors,decoding_map)
18 class IncrementalEncoder(codecs.IncrementalEncoder):
20 return codecs.charmap_encode(input,self.errors,encoding_map)[0]
22 class IncrementalDecoder(codecs.IncrementalDecoder):
24 return codecs.charmap_decode(input,self.errors,decoding_map)[0]
26 class StreamWriter(Codec,codecs.StreamWriter):
29 class StreamReader(Codec,codecs.StreamReader):
35 return codecs.CodecInfo(
47 decoding_map = codecs.make_identity_dict(range(256))
83 encoding_map = codecs.make_encoding_map(decoding_map)