I’m writing my own custom gif encoder in C and found this incredibly helpful along with a couple other references. But this one in particular is very helpful in understanding how I would structure my C code. One of the few pieces of the puzzle left for me to figure out is how to write to a variable bit stream as byte is the lowest you can easily read/write in C.