data compression approach allowing perfect reconstruction of the original data
Lossless compression is a class of data compression that allows the original data to be perfectly reconstructed from the compressed data with no loss of information. Lossless compression is possible because most … Wikipedia
🌐
Wikipedia
en.wikipedia.org › wiki › Lossless_compression
Lossless compression - Wikipedia
3 weeks ago - Lossless data compression is used in many applications. For example, it is used in the ZIP file format and in the GNU tool gzip. It is also often used as a component within lossy data compression technologies (e.g.
🌐
Adobe
adobe.com › uk › creativecloud › photography › discover › lossless-compression.html
Lossless Compression: A Complete Guide | Adobe
The compressed image has retained the fine detail of the robin’s feathers while the orange and green colour contrast is just as bright as the original. With so little pixelation, you may be hard pressed to know it was compressed at all. Take a look at another example of lossless compression below.
People also ask

What are some common formats that use lossless compression?
Common formats that employ lossless compression include ZIP for general file compression, PNG for images, GIF for animations, FLAC for audio, and ALAC for music specific to Apple. These formats apply techniques like Huffman coding, LZW, or predictive algorithms to reduce file sizes while preserving data integrity. Formats like PNG are widely used in web development because they maintain image quality, while FLAC and ALAC are preferred by music enthusiasts for their high-fidelity sound storage.
🌐
lenovo.com
lenovo.com › home
What is Lossless Compression? Definition, Examples, and How It ...
How does lossless compression work in text files?
Lossless compression in text files operates by identifying recurring patterns, characters, or sequences and encoding them more succinctly. Techniques like Huffman coding represent frequently occurring symbols with shorter codes, while methods like LZW use dictionaries to replace repetitive strings with reference pointers. For instance, a text repeating "the" multiple times might store it just once and reference it wherever needed. This reduces file size while ensuring that the original content is fully recoverable.
🌐
lenovo.com
lenovo.com › home
What is Lossless Compression? Definition, Examples, and How It ...
Can lossless compression be applied to audio files?
Yes, lossless compression can be applied to audio files. Formats like FLAC (Free Lossless Audio Codec) and ALAC (Apple Lossless Audio Codec) are designed for this purpose. They reduce file sizes while maintaining the original sound quality, making them suitable for audiophiles or music producers who require high fidelity. Unlike lossy formats like MP3, lossless audio doesn't discard data, ensuring that every nuance of the recording is preserved during compression and decompression.
🌐
lenovo.com
lenovo.com › home
What is Lossless Compression? Definition, Examples, and How It ...
🌐
Lenovo
lenovo.com › home
What is Lossless Compression? Definition, Examples, and How It Works | Lenovo US
Examples include executable programs, text documents, and specific image formats like PNG or GIF that need to preserve quality and structure. Lossless compression is also vital for files where even minor data loss could result in errors or degradation, such as backup archives or CAD files.
🌐
Imagify
imagify.io › blog › lossless-vs-lossy-image-compression
Lossy vs Lossless Image Compression: What’s the Difference? - Imagify
April 30, 2026 - Think of formats like GZIP, which compresses files for storage and transfer without removing anything inside. Popular lossless formats include TIFF and PNG. Want to see the difference after a lossless optimization?
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Glossary › Lossless_compression
Lossless compression - Glossary - MDN Web Docs
July 11, 2025 - Lossless compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data. Lossless compression methods are reversible. Examples of lossless compression include gzip, brotli, Zstandard, WebP, and PNG.
🌐
Stanford CS
cs.stanford.edu › people › eroberts › courses › soco › projects › data-compression › lossless › index.htm
Lossless Data Compression
Lossless compression techniques, as their name implies, involve no loss of information. If data have been losslessly compressed, the original data can be recovered exactly from the compressed data after a compress/expand cycle. Lossless compression is generally used for so-called "discrete" ...
Find elsewhere
🌐
ScienceDirect
sciencedirect.com › topics › engineering › lossless-compression
Lossless Compression - an overview | ScienceDirect Topics
Upon decompression, the image is perfectly reconstructed and numerically identical to the original (i.e., the original and decompressed are perfectly correlated). Run-length encoded (RLE), low-ratio JPEG and the more recent JPEG lossless compression standard (JPEG-LS) algorithms are examples ...
🌐
Adobe
adobe.com › uk › creativecloud › photography › discover › lossy-vs-lossless.html
Lossy vs Lossless Compression: Differences & Advantages | Adobe
Lossless reduces file size by removing unnecessary metadata. Lossy compression is typically used when a file can afford to lose some data, and/or if storage space needs to be drastically ‘freed up’.
🌐
Computer Science Cafe
computersciencecafe.com › 134-storage-and-compression-cie.html
Lossy & Lossless Compression | CIE IGCSE Computer Science
This matters for program code, written documents and database records. Losing one character can change an instruction, a name or a value. ZIP archives and PNG images are familiar examples of lossless compression.
🌐
KeyCDN
keycdn.com › support › lossy-vs-lossless
Lossy vs Lossless Compression - KeyCDN Support
In some cases, lossy and lossless compression can be used in combination to optimize data storage and transmission. A common example is the use of lossy compression for initial compression, followed by lossless compression on the already compressed data. This hybrid approach allows for significant reductions in file size while retaining essential information.
🌐
Avantier Inc.
avantierinc.com › home › blog › resources › case studies › lossless image compression example
Lossless Image Compression Example | Techniques & Algorithms
March 18, 2026 - Non-random images will always have entropy less than 8, making compression possible. Consider this NASA infrared Earth image (shown in false color). ... NASA infrared image of Earth used for demonstrating lossless compression methods.
🌐
Reddit
reddit.com › r/computerscience › lossless image compression - how does it actually work?
r/computerscience on Reddit: Lossless image compression - how does it actually work?
October 16, 2022 -

I'm not finding any actual answers to how this works and I'm immensely curious as to how it can reduce file size but keep the image looking identical. Everything I've found says it's removing redundancies within data, but how can that possibly happen with zero graphical impact? Seems so magical. Feel free to throw super complex algorithms at me.

Top answer
1 of 8
51
The real math is much more complex but let’s look at a simple example of lossless compression: Let’s compress the binary string “11111111” That’s just 8 one’s. If you knew I was sending these in strings that correlate to 8 digits, I could send you “111 1” (it would just be 1 4 bit string where you know that the first 3 digits are the count-1 of the final digit) Essentially, in binary I am describing a string of 8 1’s as the binary number 7 (we don’t need a 0-count value so we can use 0 for 1, so 7 means 8 of the specified digit) followed by a 1 to represent what digit I am saying there are 8 of. I’ve now described 8 bits in a lossless way with 4 bits, halving my data size
2 of 8
20
Any form of lossless compression is all about finding a more clever way of encoding the same data. At some level you can treat image data the same as any other binary data and use standard binary compression (like zip) in order to try and shrink it. However image compression usually can do better than this due to one simple fact: the images we typically are trying to compress are definitely NOT random and tend to follow certain patterns. Thus lossless image compression can do better by 1) predicting what rest of image is expected to look like based on what has been decoded so far, 2) instead of storing the raw image data store the difference between this prediction and the actual image. If your prediction algorithm does a good job this difference is MUCH smaller than raw image data. Take a look at this article about how lossless PNG works for more details.
🌐
TechTarget
techtarget.com › whatis › definition › lossless-and-lossy-compression
What are Lossless and Lossy Compression?
Lossless compression restores and rebuilds file data in its original form after the file is decompressed. For example, when a picture's file size is compressed, its quality remains the same.
🌐
ShortPixel
shortpixel.com › home › lossy vs lossless compression: comprehensive analysis
Lossy vs Lossless Compression: Comprehensive Analysis - ShortPixel Blog
February 8, 2024 - In contrast, lossless compression reduces file size while preserving data fidelity. For example, lossless compression may reduce a PNG image to 30-40% of its original size.
🌐
Cloudinary
cloudinary.com › home › lossless video format: 7 popular formats and how to choose
Lossless Video Format: 7 Popular Formats and How to Choose | Cloudinary
August 26, 2026 - Common lossless formats for images include PNG, BMP, and RAW, while WAV is widely used for audio. These formats ensure data integrity when compressed, making them ideal for archiving and professional use where quality cannot be sacrificed.
🌐
Wondershare
repairit.wondershare.com › what-is › lossless-compression-guide.html
Lossless Compression: Definition, Examples, and How It Works
March 31, 2026 - Lossless compression shows up everywhere, from zipping photo folders and archiving RAW files to exporting PNGs from Photoshop or syncing images to cloud storage. It shrinks data while keeping every pixel, frame, or character intact.
🌐
Save My Exams
savemyexams.com › igcse › computer-science › cie › 23 › revision-notes › 1-data-representation › data-storage-and-compression › compression
Compression - IGCSE Computer Science Revision Notes
May 13, 2025 - Run length encoding (RLE) is a ... sequences of the same colour · For example, a line in an image with 5 red pixels followed by 3 blue pixels could be represented as "5R3B"...
🌐
DEV Community
dev.to › binoy123 › data-compression-part-1-lossless-compression-3o83
Data compression (Part 1) : Lossless Compression - DEV Community
August 30, 2025 - Lempel-Ziv (LZ) compression is a family of lossless data compression algorithms that includes LZ77, LZ78 and LZW among others. LZ compression algorithms work by replacing repeated occurrences of data with references to a single copy.
🌐
Wix
wix.com › wixel › resources › lossless-compression
What Is Lossless Compression? Everything A Designer Needs To Know
January 2, 2026 - Reversibility: Lossless compression enables you to revert to the original file at any time. For example, a TIFF image file compressed using PNG can always be uncompressed back to its original format, ensuring no data is lost in the process.
🌐
Elegant Themes
elegantthemes.com › blog › wordpress › understanding lossless compression and when to use it
Understanding Lossless Compression and When to Use It
March 20, 2023 - Lossless compression can reduce file sizes by removing and isolating redundant data. This method can make files smaller without affecting their overall quality. It is also completely reversible. For example, here is an image with lossless compression applied to the right side.