Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Lossy/Lossless Compression Analogy (Read 10071 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Lossy/Lossless Compression Analogy

I'm going to give a presentation about the basics of audio codecs at a local college as apart of a research project within the next few days, so I made up this summaritive analogy aboyt lossless and lossy compression:

You are about to leave for a trip, and you are going to put your clothing (music) in a briefcase. You have the option of storing your clothing in two different methods. One method is that you can store all your clothing in a moderately sized briefcase. The good thing about this method is that you can keep all of your clothing and it takes practically half the space of taking your clothing without a briefcase/container. Another method would be removing some of the clothing you may not need/want to and put the ones you want to keep in a small briefcase that occupies nearly 3/4 less of taking your clothing without a container. You probably do not want to take all your clothing without a container/briefcase or a container that occupies too much or unnessecary space, but it's enirely up to you.

The first method I mentioned would be analogous to lossless compression, while the second would be analogous to lossy compression.

What do you think?

Lossy/Lossless Compression Analogy

Reply #1
Mmm... Not exactly. It is prone to confusion (as in not interpreting the correct idea)

You would need to emphasize that the music is your clothes as a whole.
I.e. it is not the same as choosing which clothes you need for that trip, but which clothes are important, so that even if you have just a part of it, you still feel like you have your clothes.


Lossy/Lossless Compression Analogy

Reply #2
I dunno...  For one thing, you're missing the lossy decompression step...    Perhaps you buy some new clothes to replace what you left at home?  The new clothes are similar, but not identical. 

An analogy involving a photo (blue sky goes here) or text might be clearer. 

Word abbreviations are a type of lossless text compression.  Or, the symbols for things like dollars, inches, meters.     

The "reader's digest version" of a novel might be a type of lossy compression.  Sheet music might be analogous to lossy compression (although it's more alalogous to a MIDI file).  I can say "Play a G-note for 30 seconds" and it takes less than 30 seconds to say that.  But it's lossy, because the sound will be different every time (different instrument, different musican, human variations, etc.).

P.S.
Or maybe the clothes you leave at home are the clothes that you would otherwise not wear on your trip...  They get left in the suitcase for the whole trip?

P.P.S.
Sometimes there is essentially no loss with lossy compression...    If we take a simple tone (i.e. a 1kHz sine wave) we can compress it to MP3 and nothing gets "thrown away".  (It's still a lossy format transformation and we do loose some timing information.)

Lossy/Lossless Compression Analogy

Reply #3
I think trying to find good analogies is usually harder than explaining the concept itself.
"We cannot win against obsession. They care, we don't. They win."

Lossy/Lossless Compression Analogy

Reply #4
Concentrated orange juice - water removed for transportation (compression stage) - add water to reconstitute (decompression stage).

Lossy/Lossless Compression Analogy

Reply #5
Lossless holiday:
Take almost all your shirts.

Lossy holiday:
Take all your shirts but cut the sleeves (because you want them all). You can still wear them, you may even like them like this but without the sleeves, there ain't shirts anymore (but there are still clothes and you won't be naked).

Lossy/Lossless Compression Analogy

Reply #6
Quote
You would need to emphasize that the music is your clothes as a whole.
I.e. it is not the same as choosing which clothes you need for that trip, but which clothes are important, so that even if you have just a part of it, you still feel like you have your clothes.

Or you deceptively appear to have all your clothes . . . like a flasher.

Personally, I'd just say that both reduce file size: lossless formats by using clever maths while preserving the audio exactly, and lossy ones by throwing bits of it that most people are unlikely to miss (particularly as bitrate increases). But I can see how this may not be readily understandable, leading to questions like "How can you 'throw out' sounds?"

Lossy/Lossless Compression Analogy

Reply #7
I dunno...  For one thing, you're missing the lossy decompression step...    Perhaps you buy some new clothes to replace what you left at home?  The new clothes are similar, but not identical. 

An analogy involving a photo (blue sky goes here) or text might be clearer. 

Word abbreviations are a type of lossless text compression.  Or, the symbols for things like dollars, inches, meters.     

The "reader's digest version" of a novel might be a type of lossy compression.  Sheet music might be analogous to lossy compression (although it's more alalogous to a MIDI file).  I can say "Play a G-note for 30 seconds" and it takes less than 30 seconds to say that.  But it's lossy, because the sound will be different every time (different instrument, different musican, human variations, etc.).

P.S.
Or maybe the clothes you leave at home are the clothes that you would otherwise not wear on your trip...  They get left in the suitcase for the whole trip?

P.P.S.
Sometimes there is essentially no loss with lossy compression...    If we take a simple tone (i.e. a 1kHz sine wave) we can compress it to MP3 and nothing gets "thrown away".  (It's still a lossy format transformation and we do loose some timing information.)


I can stress that the clothing can either be a song/songs or a music library, and that you can use different "kinds" of briefcases/containers

For the decompression part, I can say:

"If you use the first method, you can take out all of the clothing you organized for your trip once you reach your destination. For the second method, you can take out the clothing you selected for the trip"



Lossy/Lossless Compression Analogy

Reply #8
That's one of the worst analogies I have ever heard about lossy compression. It totally misses the aspect of perceptual transparency.

Lossy/Lossless Compression Analogy

Reply #9
Quote
and lossy ones by throwing bits of it that most people are unlikely to miss (particularly as bitrate increases). But I can see how this may not be readily understandable, leading to questions like "How can you 'throw out' sounds?"
How about this -

I'm on a stage during a rock concert and I whisper something to the guitar player...  If I whisper between songs, he can hear me.  If I whisper during the song, the sound waves are still there, and still hitting the guitar player's ears, but my whisper is completely drowned-out (masked) by the music.  If we can somehow "throw away" the whisper, we are throwing-away sounds that we can't hear anyway.

Lossy/Lossless Compression Analogy

Reply #10
That's one of the worst analogies I have ever heard about lossy compression. It totally misses the aspect of perceptual transparency.


Thanks for pointing that out.  I've reworded my analogy to mention adjustible quality settings and transparency within lossy codecs:

You are about to leave for a trip, and you are going to put your clothing (music) in a briefcase which you personally chose. You have the option of storing your clothing in two different methods. One method is that you can store all your clothing in a moderately sized briefcase. The good thing about this method is that you can keep all of your clothing and it takes practically half the space of taking your clothing without a briefcase/container. Another method would be to removing some of the clothing and put to the ones you want to keep in a small briefcase that occupies nearly 3/4 less of taking your clothing without a container. The thing with the second method is that you can decide how much space and the importance of the clothing you store, mostly depending on the briefcase you wish to store your clothing in. You probably do not want to take all your clothing without a container/briefcase or a container that occupies too much or unnessecary space, but it's entirely up to you.

With this analogy, the clothing represents the songs/music you wish to compress while the briefcases/containers represents the types of encoders there are. The two methods represent lossless and lossy compression

Lossy/Lossless Compression Analogy

Reply #11
Quote
Thanks for pointing that out. I've reworded my analogy to mention adjustible quality settings and transparency within lossy codecs...
You're still missing "perceptual transparancy."  Lossy compression is intelligent.    What you are describing is more like reducing the sample rate (resolution) of an uncompressed audio file, or like reducing the resolution of a photo.  A JPEG version of a bitmap image is much better than a bitmap reduced to the JPEG file size.

In fact, that would make a good presentation...  Show a bitmap image, a JPEG of the same image, and a reduced-resolution bitmap that's the same file-size as the JPEG.

Back to clothing, let's try this  -  You have 5 nearly identical blue neckties.  You only bring one and nobody knows the difference...

I'm having trouble with the lossless analogy too...  I don't see how cramming clothing into a suitcase relates to reducing the number of bits in a file...  Your college audience probably knows what a ZIP file is.  Maybe you should describe a lossless audio file as similar to a ZIP, optimized for audio.










Lossy/Lossless Compression Analogy

Reply #13
Anyone, if you want to find a good analogy, it must allow the subject to shift his attention or focus wherever he wants to, and that act must not reveal a difference. All proposals so far lack that property. A good lossy audio encoder is certainly able to deliver an equivalent experience for at least 99% of known music.

I'm with greynol that it will be hard to find anything adequate. JPEG comes to my mind, which comes close, but that would just describe one complex, technical concept by pointing to another one.

Lossy/Lossless Compression Analogy

Reply #14
Your analogy needs to be: It looks absolutly identical, but it only takes half the space. Your idea is more like "hey cut off the buttons, maybe nobody notices".

JPEG comes to my mind, which comes close, but that would just describe one complex, technical concept by pointing to another one.

Spoting JPEG artifacts is as easy as looking at a spectral view. Unlike audio you can just look closely, go near the screen etc.

Lossy/Lossless Compression Analogy

Reply #15
Spoting JPEG artifacts is as easy as looking at a spectral view. Unlike audio you can just look closely, go near the screen etc.


You can also "zoom" into quiet audio passages by increasing the volume to insane levels. That can unreal artifacts. You can also play a track slower than intended, which instantly reveals artifacts that would else go unnoticed.

But I think I have found a perfect analogy, at least for spectral band replication, employed by HE-AAC:

"I Can't Believe It's Not Butter!"


Lossy/Lossless Compression Analogy

Reply #16
Ezlez, you did not get off to a good start. You need to start over. First thing you need to do is learn how lossy compression works. You cannot teach a topic until you understand it well. On the other hand, "Those who can do; those who can't teach."

Lossy/Lossless Compression Analogy

Reply #17
What I wanted to do with the analogy at first was to give a basic& simple glance of lossless/lossy codecs, even if it didn't encompass all aspects of compresion. Of course when the time comes around for actually discussing about lossy/lossless codecs, I'm going to talk different facets of lossless/lossy compression, including transparency, bit by bit restoration, noise shaping, etc.

Lossy/Lossless Compression Analogy

Reply #18
I'm on a stage during a rock concert and I whisper something to the guitar player...  If I whisper between songs, he can hear me.  If I whisper during the song, the sound waves are still there, and still hitting the guitar player's ears, but my whisper is completely drowned-out (masked) by the music.  If we can somehow "throw away" the whisper, we are throwing-away sounds that we can't hear anyway.

I think this is the best analogy in this thread so far.

Lossy/Lossless Compression Analogy

Reply #19
Oh, how about lossy = fake jewellery?

Its value and cost are "heavily compressed", but perceptual qualities remain almost the same.
A good quality fake can be practically indistinguishable ("transparent").
It feels the same, and it shines the same.
It's affordable, practical and looks just like the "real thing".

While the "uncompressed, high definition" real gold and diamonds are more of a luxury than necessity.

So what, it's not a real diamond. As long as she doesn't know it's a fake, she will love you all the same. 

How does she know it's a fake?
She goes to a professional jeweller, who can examine it with a microscope.


And then lossless "compression" would mean this: when you melt your golden rings and bracelets and cast it all into a slab. And later one can "uncompress" it back into original shapes. The material value is never lost in the process. Lossless!

Lossy/Lossless Compression Analogy

Reply #20
What do you think?


Honestly I think its not a very good analogy, but if you wish to use it.. There is a simpler way to say it.
-You are going on a weekend trip, you are limited to just carry on luggage. Do you A) Pack one full dress outfit with all the trimmings including full-sized bottles of your shampoo etc. or B) Pack 3 outfits and mini-bottles of your toiletries? With option A you will look great for one day only, with option B you have clean clothes for each day of your trip.

In my opinion you would be better off just stating the actual facts..
-You are going on a weekend trip. Do you take enough music in your portable for 48 hours of continuous play, or do you want 12 hours of 'no-compromise' music? Remember that neither you nor your friends will be able to tell any difference. Its a psychological thing. Each individual will decide for herself which option makes them feel best about themselves.

Lossy/Lossless Compression Analogy

Reply #21
Lossy art exhibition:

Displaying the originals is costly (safety measures, insurance), so for some works you bring simply photocopies.

If you choose to photocopy the artist's oil paintings (16 of them), the audience will spot the difference instantly, due to the texture.
So instead you photocopy the artist's coal sketches (240 of them), cutting the costs to 1/8.

What you have achieved:

- Half the audience are view the exhibition casually, and wouldn't be able to tell.
- The rest will go close enough to see the fine print saying "Reproduction -- contact the museum to book a guided tour to the vaults where the originals are displayed".
- Of this rest, half of them will pay to see the lossless original.
- And the reproduction, while technically cheap and imperfect, looks so good that half of the ones who compare are unable to tell any difference.
- And of those who can even tell, half will admit it isn't really that much of a difference.
- The rest will be bloody annoyed that you display a cheap reproduction, not to mention the fact that you charge extra to see the originals. And in fact, quite a few of those who could never tell the difference will be upset for the same reason.

Lossy/Lossless Compression Analogy

Reply #22
I still think greynol was right. This is also lacking. An expert may spot a difference between an original and a fake, but that analogy isn't true for a good lossy compressor. That may be only transparent for 92% instead of 99% of all samples to a highly trained listener, but nevertheless most samples would sound identical. An art "expert" with that score could certainly be called a fraud.

Lossy/Lossless Compression Analogy

Reply #23
How about this: Lossless is to lossy as a solid copper penny is to one made from copper plated nickel. In the normal way you use a penny, you can't distinguish the two because they have the same appearance and weight. In the normal way you use audio, you can't distinguish the two because they sound the same. If you cut in to the penny, you can tell. If you do spectral analysis on the lossy signal, you can tell. If the plating is too thin or uneven, you can distinguish the pennies. If the lossy bitrate is too low, you can distinguish the audio.

P.S. Pennies are actually made of copper-plated zinc - they're somewhat lighter than the original solid copper pennies.

Lossy/Lossless Compression Analogy

Reply #24
But I think I have found a perfect analogy, at least for spectral band replication, employed by HE-AAC:

"I Can't Believe It's Not Butter!"



Have you ever tasted that stuff?  Yech.

Maybe that's what you meant though?  that lossy compression tastes like rancid salted hydrolyzed corn oil?