10 Meta m(
"coder",
"ternary",
"Ternary encoding");
21 template<
typename value_t>
23 m_out->write_ternary(v);
32 template<
typename value_t>
34 return m_in->read_ternary<value_t>();
Represents a generic range of positive integers.
Encoder(Env &&env, std::shared_ptr< BitOStream > out, literals_t &&literals)
Constructor.
Contains the text compression and encoding framework.
value_t decode(const Range &)
std::shared_ptr< BitOStream > m_out
The underlying bit output stream.
value_t decode(const Range &r)
Decodes an arbitrary-range integer value.
Decoder(Env &&env, std::shared_ptr< BitIStream > in)
Constructor.
void encode(value_t v, const Range &)
void encode(value_t v, const Range &r)
Encodes an arbitrary-range integer value.
Interface for algorithms.