A codec is an algorithm which describes a method of compressing and decompressing data, thus the name codec, derived from compression decompression.
One guide describes codecs in this manner:
|“||When you make an audio or video recording, the "raw" file that is created is often VERY large. ... So what can be done about this? Well many years ago, circa 1980's, special "mathematical algorithms" were designed to make the files smaller but still play well on a computer. And so codec's were born.||”|
The Free Lossless Audio Codec, abbreviated as FLAC, is, as the name suggests, an open-source lossless digital audio codec, and purports itself to be the fastest, most widely supported lossless audio codec. FLAC has been incorporated under the banner of the Xiph.org Foundation, along with Vorbis, Speex, Theora and others.
MP3 (short for MPEG-1 Audio Layer 3) is a set of audio decoding and encoding algorithms created by Fraunhofer IIS in Germany, which can achieve high compression ratio with little loss in audio quality.
Although newer codecs can offer higher compression ratio or higher audio quality for a given ratio, MP3 has remained popular due to its near-universal compatibility.
Vorbis, commonly known as Ogg Vorbis, due to the common use of Ogg as a containment wrapper for Vorbis, is an open-source audio compression codec which is capable of delivering greater audio quality at a lower file size than does MP3. Vorbis is also free of the aggressive copyright policy that MP3 is licensed under, which forces software writers to pay a fee to be able to legally write and distribute software that is capable of encoding audio as MP3.
Theora is another Xiph.org codec, in this case, designed for the compression of video.