| 112 | // This would probably be an overkill. |
| 113 | template <typename TWriter> |
| 114 | void WriteEncoding(TWriter & writer) |
| 115 | { |
| 116 | // @todo Do not waste space, use BitWriter. |
| 117 | WriteVarUint(writer, m_decoderTable.size()); |
| 118 | for (auto const & kv : m_decoderTable) |
| 119 | { |
| 120 | WriteVarUint(writer, kv.first.bits); |
| 121 | WriteVarUint(writer, kv.first.len); |
| 122 | WriteVarUint(writer, kv.second); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | template <typename TSource> |
| 127 | void ReadEncoding(TSource & src) |