The principle is "to use fewer bits for more frequently occurring character".
See http://www.cs.duke.edu/csed/poop/huff/info/
Decompresses a binary string into an array. Make sure you use the right *tree and *dict as generated by the compress method.
Converts a binary string into 8-bit bytes. Up to 7 zeros might be padded automatically at the end. The number of zeros is stored in *pad. *pad is semi-private and used when converting back to bytes.
Converts an array of 8-bit bytes into a binary string.
Semi-private counter for number of padded zeros. Set by *binaryStringToBytes and read by *bytesToBinaryString.
Multi-level List with values as leaves.
Look-up dictionary with values and binary strings.