Handmade Network»Forums
Taylor Robbins
42 posts / 1 project
I love programming and the joy that comes from creating useful things. I'm the author of Const Port. I like to make toy games as a hobby.
Any interest in a stream going over Gif Encoding / LZW compression in C?
Edited by Taylor Robbins on Reason: Initial post
Hey everyone,

So recently I took on the task of implementing a system to record and export GIFs directly from our game. If you've ever looked at the GIF file format spec you'll know that it requires you to encode the pixel data using LZW compression. So I spent a couple of days looking around at various implementations and trying other people's libraries for GIF encoding. Eventually I ended up writing my own LZW compression algorithm implementation in C which turned out to be a really cool learning experience for me. So now we can easily export GIFs straight from the game itself:

We can even edit and review the pixel data before encoding:


I've also recently starting doing some programming live streams on Twitch. I realize I really love explaining stuff and talking to people about the implementation details of doing large scale projects. I figured there might be some people here that might be interested in making GIFs or compression in general that would be interested to see the code that I wrote for this system. I can't say that I am an expert on compression, far from it, but I'd love to spend some time going over this implementation with anybody who cares to listen. And if, by chance, there is someone who is actually good at compression I'd love to hear and talk to them about what I've written and get some feedback.

So if you are interested in watching a stream about GIF encoding or LZW compression please post a comment here. If I get enough interest I will plan a time and do a stream soon.
Ben Visness
109 posts / 9 projects
HMN lead.
Any interest in a stream going over Gif Encoding / LZW compression in C?
I would be interested! I don't know much about compression yet and this sounds like it would be a pretty good intro.
Spencer Isaacson
3 posts
Any interest in a stream going over Gif Encoding / LZW compression in C?
That is super cool. I'm definitely interested, as I am planning on learning LZW in the near future anyway.