Your question seems a little weird. You are talking about Kraft inequality, Shannon & Huffman codes, so you seem to already have some knowledge in algorithmics in general, and in compression algorithms specifically. So why don't you just try?
My only source when it comes to dealing with .zip compression format is this library:
SharpZipLib[
^]
It is written in C#, though, not in C++. From
there[
^], you may find something that fits your needs.
That[
^] could be of great help, too.
Good luck :)