Started learning Rust a couple of months ago, anybody willing to give some critique on my humorously slow gzip decoder? (I promise I tried really hard)

109 points jude-peel

A while ago I got it in my head that taking a png file and getting the raw RGB values without any dependencies surely had to be a reasonably easy task, then I found out that the IDAT chunks were compressed. Then I thought decompressing it without any dependencies surely couldn't be too hard, so I began writing this gzip decoder to learn about DEFLATE. 3 hard weeks of staring at RFC 1951 later, and this is the outcome.