15 Meta m(
"lcpcomp_dec",
"QueueListBuffer");
24 std::vector<uliteral_t> m_buffer;
25 std::vector<std::vector<len_compact_t>> m_fwd;
31 len_t m_longest_chain;
32 len_t m_current_chain;
37 m_longest_chain = std::max(m_longest_chain, m_current_chain);
38 m_max_depth = std::max<len_t>(m_max_depth, m_fwd[
pos].size());
43 for(
auto fwd : m_fwd[pos]) {
44 decode_literal_at(fwd, c);
46 std::vector<len_compact_t>().
swap(m_fwd[pos]);
54 :
Algorithm(
std::move(
env)), m_cursor(0), m_longest_chain(0), m_current_chain(0), m_max_depth(0) {
56 m_buffer.resize(size, 0);
57 m_fwd.resize(size, std::vector<len_compact_t>());
62 decode_literal_at(m_cursor++, c);
66 for(
len_t i = 0; i < num; i++) {
69 decode_literal_at(m_cursor, m_buffer[src]);
71 m_fwd[
src].push_back(m_cursor);
79 return m_longest_chain;
83 for(
auto c : m_buffer) out << c;
Contains the text compression and encoding framework.
A vector over arbitrary unsigned integer types.
uint8_t uliteral_t
Type to represent signed single literals.
void decode_literal(uliteral_t c)
IntVector< uint_t< 1 > > BitVector
Represents a bit vector, alias for IntVector with a fixed bit width of 1.
DecodeForwardQueueListBuffer(Env &&env, len_t size)
void decode_factor(len_t pos, len_t num)
Env & env()
Provides access to the environment that the algorithm works in.
void decode_eagerly() const
void write_to(std::ostream &out)
fast_t< len_compact_t > len_t
Type to represent an length value.
void swap(GenericViewBase< T, Q > &lhs, GenericViewBase< T, Q > &rhs)
constexpr len_t undef_len
len_t longest_chain() const
Local environment for a compression/encoding/decompression call.
Interface for algorithms.