Follow

how does compression work? why does a compressed JPEG look different, but a JPEG in a compressed zip file looks the same? (long, serious) 

i actually made a slightly improved RLE algorithm for use in a video game once - i could store the tile data much more efficiently by specifying that there were, say, ten trees in a row rather than listing "tree" ten times. i got around the a1b1c1d1e1 problem by making it possible to write something like "abcd2e2". if there was no number present, the algorithm assumed 1.

the game was never finished (never anywhere close!). honestly, i had a lot more fun working on the code than i did the actual game...

also i skipped a few details in this post because compression gets really complex as you move onto more sophisticated algorithms, so sorry about that 0u0;

how does compression work? why does a compressed JPEG look different, but a JPEG in a compressed zip file looks the same? (long, serious) 

how does compression work? why does a compressed JPEG look different, but a JPEG in a compressed zip file looks the same? (long, serious) 

@anathem thank you! tom scott's videos are always fantastic. i got the idea to mention youtube's inability to properly handle static from that second video, actually!

how does compression work? why does a compressed JPEG look different, but a JPEG in a compressed zip file looks the same? (long, serious) 

@lynnesbian This is a really cool an easy to follow explanation, thanks for sharing 👍

Sign in to participate in the conversation
Lynnestodon

@lynnesbian@fedi.lynnesbian.space's anti-chud pro-skub instance for funtimes