title: Decoding Huffman file from canonical form
body: <p>I am writing a Huffman file where I am storing the code lengths of the canonical codes in the header of the file. And during decoding, I am able to regenerate the canonical codes and store them into a <code>std::map&lt;std:uint8_it, std::vector&lt;bool&gt;&gt;</code>. The actual data is read into a single <code>std::vector&lt;bool&gt;</code>. Before anyone suggests me to use <code>std::bitset</code>, let me clarify that Huffman codes have variable bit length, and hence, I am using <code>std::vector&lt;bool&gt;</code>. So, given that I have my symbols and their corresponding canonical codes, how do I decode my file? I don't know  where to go from here. Can someone explain to me how I would decode this file since I couldn't find anything proper related to it on searching.</p>