Compression is applied to a variety of files. In any creative field, Photo Video Audio, you are working with compressed files constantly. Many files are acquired as compressed formats from the moment of creation.
Lossless Codecs / Lossless Compression
There are many lossless video codecs, common ones include H.264 Lossless, H.265 Lossless, Motion JPEG Lossless, Apple Animation Quicktime RLE, Autodesk Animator Codec, and many more.
Lossless, means that when you use this type of compression for your file you do not lose any of the file information. 100% of the information is retained. Meaning color depth, bit depth, pixels, frames, and more.
The obvious advantage here is with a lossless codec you always have all file information to work with and make adjustments.
Lossy Codecs / Lossy Compression
Lossy Codecs also come with a variety of format options. Common codecs include HEVC, MPEG4, H.264, AVC, and many others.
Lossy codecs are wonderful for delivery, especially on the web. In fact, outside of broadcast, most organizations want their final deliverable in a Lossy codec. Why? Because they are often much smaller files and to the naked eye, a well-compressed file is unrecognizable as to whether or not file information was lost in compression.
ProRes and Avid DNx
So the big question is always about ProRes and Avid DNx, right? Apples ProRes especially is what the vast majority of non-feature film production is using.
Both Apple and Avid refer to their codecs as Virtually Lossless, which is a great marketing term for saying it is lossless but really good.
As an industry, video professionals agree. Although not technically lossless ProRes and DNx provide massive amounts of information to work with and manipulate files, even when the deliverable is going on the big screen. Certainly when the deliverable is for internet streaming.
So which type of compression is best?
Lossless is always ideal for the most information during production. If you can't go lossless, Apple ProRes or Avid DNx are phenomenal options with tons of depth to work with, while not being too large.
After you're done, most deliverables are sent to clients in lossy formats, which is generally preferred.