14 Meta m(
"coder",
"delta",
"Elias-delta encoding");
26 template<
typename value_t>
28 m_out->write_elias_delta(v);
38 template<
typename value_t>
40 return m_in->read_elias_delta<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.
Decodes data from a stream of Elias-Delta codes.
Encodes data to a stream of Elias-Delta codes.
Defines data encoding to and decoding from a stream of Elias-Delta codes.
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.
value_t decode(const Range &)
void encode(value_t v, const Range &r)
Encodes an arbitrary-range integer value.
Interface for algorithms.
void encode(value_t v, const Range &)