Add methods for setting encoders and decoders