Lossless and lossy compression are terms that describe whether or not, in the compression of a file, all original data can be recovered when the file is uncompressed.

With lossless compression, every single bit of data that was originally in the file remains after the file is uncompressed. All of the information is completely restored.
Here are a few lossless file formats we use most:
  • The Graphics Interchange File (GIF) is an image format used on the Web that provides lossless compression.
  • TIFF (originally standing for Tagged Image File Format) is a file format for storing images, popular among graphic artists, the publishing industry and both amateur and professional photographers in general.
  • RAW refers to a family of raw image formats that are options available on some digital cameras. These formats usually use a lossless or nearly-lossless compression, and produce file sizes much smaller than the TIFF formats of full-size processed images from the same cameras. Although there is a standard raw image format, (TIFF/EP), the raw formats used by most cameras are not standardized or documented, and differ among camera manufacturers.

Lossy compression reduces a file by permanently eliminating certain information, especially redundant information. When the file is uncompressed, only a part of the original information is still there. Lossy compression is generally used for video and sound, where a certain amount of information loss will not be detected by most users.
Typically, we use JPEG files.
  • The JPEG (Joint Photographic Experts Group) image file, is a compression method commonly used for photographs and other complex still images on the Web. Using JPEG compression, the creator can decide how much loss to introduce and make a trade-off between file size and image quality. When not too great, the compression does not noticeably detract from the image's quality, but JPEG files suffer generational degradation when repeatedly edited and saved.