Huffman encoding of the text templates was intended originally, but eventually scrapped in favorite of simpler (smaller) encoding schemes. Still, the code here is pretty good, and might be useful for other purposes later.