Changed APIs of encoders and decoders to also use uint8_t