Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between coding and compression?

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?

like image 615
user2922938 Avatar asked Sep 15 '26 16:09

user2922938


1 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.

like image 195
bdean20 Avatar answered Sep 18 '26 10:09

bdean20



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!