
What is a lossless format?

Whether it’s images, music, or video files, it’s important to understand the difference between the different types of formats and when they are used.

Using the wrong format can degrade the quality of the file or make it too large.
Some types of media file formats are “lossy” and others are “lossless.” We will explain what these terms mean, the benefits of each type of file format, and why you should never convert lossy formats to lossless formats.
Compression explained
We use compression to reduce the size of files, allowing them to load faster and take up less disk space. For example, when you take a photo, your camera captures all the light it can receive and collects the image. If you save an image in RAW format, which stores all the lighting data captured by the camera’s sensor, the image size can be up to 25MB. (This depends on the resolution of the image – a camera with more megapixels will create a larger image.)
If we simply upload these files to a social network or post them to a website, we don’t want these image files to take up so much space. A photo gallery with RAW images can take up hundreds of megabytes of space. RAW formats can be used by professional photographers to maintain high image quality while editing, but they are not intended for the average person.
Instead, our camera or smartphone converts the image to a JPEG file. JPEG files are much, much smaller than RAW images. When you convert RAW to JPEG, some of the image data is “thrown away”, creating a much smaller file. The conversion process uses a compression algorithm that works well for photos, making them look pretty good despite being compressed. You may still see compression artifacts, depending on the quality setting.
Note that lossy formats usually have a setting that controls their loss. For example, JPEG has a variable quality setting. Poor quality makes the JPEG image file smaller, but the image quality is noticeably worse. Here’s a great example of a lossy JPEG – you can see various “compression artifacts”.
Lossless and lossy formats
We call RAW a “lossless” format because it retains all the data in the original file, while we call JPEG a “lossy” format because some data is lost when the image is converted to JPEG. However, these are not the only lossy and lossless formats.
Images: RAW, BMP, and PNG are all lossless image formats. JPEG and WebP are lossy image formats.
Audio: WAV is a container file often used for storing lossless audio, although it can also contain lossy audio. FLAC is a lossless audio format and MP3 is a lossy audio format.
Video . Some lossless video formats are widely used by consumers as they make video files take up a large amount of space. Common formats like H.264 and H.265 are lossy. H.264 and H.265 can provide smaller files with higher quality than previous generations of video codecs because it has a “smarter” algorithm that better chooses the data to discard.



















