| 20 | } |
| 21 | |
| 22 | bool HuffmanCoder::Decode(Code const & code, uint32_t & symbol) const |
| 23 | { |
| 24 | auto it = m_decoderTable.find(code); |
| 25 | if (it == m_decoderTable.end()) |
| 26 | return false; |
| 27 | symbol = it->second; |
| 28 | return true; |
| 29 | } |
| 30 | |
| 31 | void HuffmanCoder::BuildTables(Node * root, uint32_t path) |
| 32 | { |