I find it funny that GIFs are still being referred as GIFs [1] while most places serve them as h264 yuv420p MP4s [2].<p>[1] <a href="https://i.giphy.com/l0Iy1ZcHArR9aAQta.gif" rel="nofollow">https://i.giphy.com/l0Iy1ZcHArR9aAQta.gif</a> (2.7MB)<p>[2] <a href="https://i.giphy.com/media/l0Iy1ZcHArR9aAQta/giphy.mp4" rel="nofollow">https://i.giphy.com/media/l0Iy1ZcHArR9aAQta/giphy.mp4</a> (307KB)<p>[3] <a href="https://media.giphy.com/media/l1J3OGcUiw8NeXuM0/source.mp4" rel="nofollow">https://media.giphy.com/media/l1J3OGcUiw8NeXuM0/source.mp4</a> (146KB) <-- optimized with ffmpeg
I found this quite hard to read despite the interesting content, mainly due to the animated gifs inserted throughout the article. It's very hard to focus on a line of text when there's an image darting around on the page. I wonder why the author decided to include them?
Gary Bernhardt has a great live screencast where he writes a compressor - for anyone that found this hard to follow: <a href="https://www.youtube.com/watch?v=3Eu9ZVZEZ3I" rel="nofollow">https://www.youtube.com/watch?v=3Eu9ZVZEZ3I</a>
OP here - I'm seeing 50/50 support for the gifs. I'm keepin my gifs. I like the idea of adding, and will probably implement, a toggle for all extraneous gifs. I love that most of the commentary about this article is about the gifs. Gifs.
The pixel art doesn't show up for me in Firefox or Edge. (Looks like they're there, just with a height of 0px?) Also, my motion-sensitive lizard brain thanks you for the gif toggle button.
Unless I mis-read or mis-understood you seem to invert the meaning of compression ratio half way through ?<p>> (100 / 200) = 0.5. Protip: compression ratios less than 1 are frowned upon.<p>> Unfortunately, it's not that simple. Say we had an algorithm (let's call it A) that, given any input whatsoever, was capable of achieving a compression ratio of strictly less than 1.
Once you understand RLE, LZ is only one step away --- instead of repetitions of individual characters/bytes/etc., you encode repetitions of longer strings.<p>But starting with RLE is IMHO definitely a good choice --- far better than Huffman, as a lot of introductory material seems to do. A minimal LZ12/4 (4KB window, 18B max length; an old favourite of the demoscene intro packers) compressor/decompressor pair is literally a few hour's worth of work, and yields surprisingly good compression for its simplicity, much better than simple order-0 Huffman.
I'm probably getting old because I can't stand this new trend of putting useless gifs (or mp4's actually) every two paragraphs in every article on the web. Oh, and of course all of them have autoplay enabled because sole purpose of my laptop's fan is to happily spin at full speed. </random rant>
Awesome! Thanks!<p>Any chance you want to do one on compression of a integer time series? How about variable length integers? Such an article would be very appreciated in IoT circles since data (timed voltage values) transfer and storage can get quite expensive for dollars and latency.<p>Cheers!
The first example (tree represented in Japanese) seemed a bit misleading, because the "alphabet" has not been kept as a constant. Since the Japanese alphabet is much larger, it may be argued that the number of bits actually occupied in storage by "本" and "tree" are about the same. Could someone clarify if this is correct reasoning?
I really like the article. One point if like to see: you stepped over the fact that your using palettes without mentioning even though that gets you down from using 3 (or 4) bytes a pixel to 1/4. It's a compression ratio of 8 that your completely ignoring!
> This might eek out a little more compression<p>It's "eke": <a href="http://www.dictionary.com/browse/eke" rel="nofollow">http://www.dictionary.com/browse/eke</a>
Add a way to toggle the gifs off at the beginning for people that don't like memes distracting them from the content and you've got yourself a winner.
Great article, would be interested in more in depth articles on say, JPEG compression in the future.<p>Really liked the better/worse thing too, added some nice comparison
I toggled the gifs off since I read the comments before the article. I must say, the article is excellent and you could even share it with a non-technical manager or spouse*<p>*goes ands talks to wife about compression basics :)