title: How to Save Huffman code
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/347316/need-help-on-how-to-encode-words-using-huffman-code">need help on how to encode words using huffman code</a>  </p>
  </blockquote>
  
  
  
  <p>Suppose I have the following Huffman coded symbols</p>
  
  <p>A - 0
  B - 10
  C - 110
  D - 111
  and that you want to encode the sequence</p>
  
  <p>A B A A C D A D B B
  then I get the binary code like this:
  01000110 11101111 010</p>
  
  <p>(01000110) = 0x46
  (11101111) = 0xEF</p>
  
  <p>010=????
  if there is no 010 in this code, I can save these byte into a file.
  now how should I process this 010? Save it as 00000010? that doesn't work.</p>