Another alternative of course, is to use zlib. You'll not ever find a file compressed with Huffman that is smaller than the same file processed with zlib's deflate.
Here, lemme google that for ya[
^]
From memory, in a worst-case, deflate adds at most 12 or 16 bytes to an input stream. Depending on the method of sharing the tree (either pre-defined or transmitted) you can find that Huffman behaves poorly or abhorently on (some) small files.
That's why zlib's deflate is used in everything from web-servers to mobile phones to png+jpg to pdf etc, etc.