MCPcopy Create free account
hub / github.com/comaps/comaps / WriteEncoding

Method WriteEncoding

libs/coding/huffman.hpp:114–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 3

EncodeAndWriteBlockMethod · 0.80
UNIT_TESTFunction · 0.80
BuildSuccinctTrieFunction · 0.80

Calls 2

WriteVarUintFunction · 0.85
sizeMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.64