renamed Codec -> CodecBase
implemented Codec class that includes Encoder and Decoder