I know compression is the process of re-encoding digital data to reduce file size; a specialized program called a codec, for COmpressor/DECompressor, changes the original file to the smaller version and then decompresses it to again present the data in a usable form. For audio where does the difference lie between audio coding and audio compression?
2 Answers
Encoding is taking the features of the waveform and giving them a value according to some code table. Some code tables have a way of representing the input format much smaller, but there is a distinct mapping of features in the waveform to features in the encoded file and encoding or decoding can be performed using just a lookup table.
Encoding should always be good for streaming.
Compression typically attempts to find patterns within the data that allow a more succinct representation over the whole of the file at the cost of some overheads (streaming may require more memory for a compressed format, for example). The most effective compression algorithms will model the data in many ways to determine if there is any overlap that can be exploited.
Good audio compression formats support streaming as well, but they don't necessarily need to be streamable.
Overall, think of compression as an extension of encoding that's useful if your files are too large. For most users, they may as well be the same thing.

- 822
- 8
- 14
Given some data that you want to present to the user, Encoding is the way you represent that data in a file or stream. The concept of encoding is relevant to other types of files, too : http://en.wikipedia.org/wiki/Character_encoding.
Compression is any technique used to store or send the data in a smaller number of bytes than a 'naive' representation would take up - for audio, that 'naive' representation would be a basic PCM representation. There are two basic types of compression - lossless (e.g. FLAC) , which allows the original PCM data to be reconstructed perfectly, and lossy (e.g. MP3) which as well as taking advatage of patterns in the data, also takes advantage of the way human perception works to strip away data that won't be missed so much.
So compression is something you could do when you are encoding, but you don't have to encode using compression!

- 1,139
- 1
- 11
- 21