How does compression work? (Livecoding in Haskell)
Where I go through the implementation of a simple compression algorithm for educational purposes. To explain and understand what makes compression algorithms tick. In practice this is me fumbling on my keyboard a lot. But I hope you'll learn something in the process!
I didn't mention it in the video but this is not an encouragement to roll your own compression. There are plenty of very good compression algorithms available off the shelf, with a variety of trade-off between compression factor and speed. If the basic principles of compression are simple, making a good, efficient algorithm requires a lot of know how, you are almost always better off using these algorithms. So it's really knowledge, for the sake of knowledge itself.
The algorithm in this video, by the way, is based on bzip2 (https://en.wikipedia.org/wiki/Bzip2).
The code that I wrote during that stream can be found at https://github.com/aspiwack/information-stream .
This video was originally livestreamed on Twitch, you can find the original at https://www.twitch.tv/videos/478078688