|
@@ -151,7 +151,7 @@ namespace simple::compress
|
|
|
{
|
|
|
using key_type = std::make_unsigned_t<underlying_type_t<typename std::iterator_traits<It>::value_type>>;
|
|
|
small_table<key_type, std::size_t> counter{};
|
|
|
- small_table<key_type, bits<>> code{}; // TODO smaller key, smaller bits
|
|
|
+ small_table<key_type, bits<>> code{}; // TODO smaller key -> less bits
|
|
|
std::conditional_t<bit_count(key_type{}) <= 13,
|
|
|
static_vector<std::pair<key_type,key_type>, (1 << bit_count(key_type{}))>,
|
|
|
std::vector<std::pair<key_type,key_type>>
|
|
@@ -183,7 +183,7 @@ namespace simple::compress
|
|
|
if(0 == minmin[1].second)
|
|
|
break;
|
|
|
|
|
|
- // FIXME handle insert fail
|
|
|
+ // FIXME handle code length overflow
|
|
|
code[minmin[0].first].insert(0);
|
|
|
code[minmin[1].first].insert(1);
|
|
|
for(auto& [symbol, parent] : hierarchy)
|