3 #include <tudocomp/config.h> 4 #ifdef JUDY_H_AVAILABLE 19 class JudyTrie :
public Algorithm,
public LZ78Trie<> {
26 JLI(pvalue, m_dict, node);
27 DCHECK_NE(pvalue, PJERR);
32 inline static Meta meta() {
33 Meta m(
"lz78trie",
"judy",
"Lempel-Ziv 78 Judy Array");
36 inline JudyTrie(Env&& env,
size_t n,
const size_t& remaining_characters,
factorid_t = 0)
37 : Algorithm(
std::move(env))
38 , LZ78Trie(n,remaining_characters)
39 , m_dict(static_cast<Pvoid_t>(nullptr))
44 inline node_t get_rootnode(
uliteral_t c)
const {
45 DCHECK_LT(
create_node(0,c), std::numeric_limits<factorid_t>::max());
53 return node_t(m_size-1,
true);
57 if(m_dict !=
nullptr) {
64 inline node_t find_or_insert(
const node_t& parent,
uliteral_t c) {
73 return node_t(newleaf_id,
true);
75 return node_t(
id-1,
false);
78 inline size_t size()
const {
85 #endif// JUDY_H_AVAILABLE
Contains the text compression and encoding framework.
uint_t< 40 > squeeze_node_t
uint8_t uliteral_t
Type to represent signed single literals.
uint32_t factorid_t
Type for the factor indices, bounded by the number of LZ78 trie nodes.
squeeze_node_t create_node(factorid_t id, uliteral_t c)