Day 13: Off by one errors
Today I spent most of the day figuring out that
text
n_to_read = head.hlit + head.hdist + 257should be
text
n_to_read = head.hlit + head.hdist + 258And I still don’t know why, exactly. In related news, I can now almost decompress gzipped files.
I think the life lesson here is “sometimes it takes forever to figure things out and it is no fun” :)