Account for huffman encoding & header offset

I'm 60% sure this is correct.