Most people use the terms encoding and transcoding interchangeably, however there is a distinct difference between the two. Encoding refers to taking an uncompressed source and converting it to a compressed file whereas transcoding is taking an already compressed file and converting it to another compression scheme. These compression schemes are commonly referred to as codecs. Codec, in this context, is the standard or format of the compression.
In order for a computer to create or decipher files using a compression format it employs a program that codes and decodes to and from that standard. This program is also referred to as a codec and is where the portmanteau is derived from; coder/decoder. These programs are akin to their hardware counterparts endecs (encode/decode), used for encoding analog signals such as those from a VCR to files, and modems (modulator/demodulator), if you’re old enough to remember them, which were used for sending digital information over analog telephone lines.
Ah, the good old days of BBSs. Yes, they were a thing. Look it up.