5 #include <libutl/ArithmeticEncoder.h> 194 start(mode, stream, owner, blockSize);
197 virtual size_t decode(
byte_t* block,
size_t num);
199 virtual size_t encode(
const byte_t* block,
size_t num);
211 virtual void clear();
212 virtual void finishEncoding();
224 void undoTransform(
byte_t* block);
236 void mtfEncodeBlock();
237 void mtfDecodeBlock();
238 void mtfEncodeSymbol(
uint_t symbol);
240 void mtfEncodeRandomWord(
uint_t w);
241 uint_t mtfDecodeRandomWord();
242 void mtfEncodeRandom(
uint_t symbol);
244 void mtfEncodeZeroes();
void deInit()
De-initialize UTL++.
Encoder/decoder abstraction.
BWTencoder(uint_t mode, Stream *stream, bool owner=true, uint_t blockSize=KB(256))
Constructor.
#define UTL_CLASS_DECL(DC, BC)
Declaration of standard UTL++ functionality for a non-template class.
void multiKeyQuickSort(const FwdIt &begin, const FwdIt &end, bool key=true, bool reverse=false, size_t size=size_t_max)
Multi-key quick-sort a sequence.
unsigned char byte_t
Unsigned character.
void swap(T *array, size_t lhsIdx, size_t rhsIdx)
Swap two elements of the given array.
Statistical context for ArithmeticEncoder.
unsigned int uint32_t
Unsigned 32-bit integer.
void quickSort(const FwdIt &begin, const FwdIt &end, const Ordering *ordering=nullptr, size_t size=size_t_max)
Quick-sort a sequence.
unsigned int uint_t
Unsigned integer.
const uint_t uint_t_max
Maximum uint_t value.
void insertionSort(const FwdIt &begin, const FwdIt &end, const Ordering *ordering=nullptr, size_t size=size_t_max)
Insertion-sort a sequence.
constexpr size_t KB(size_t n)
Convert size in kilobytes to size in bytes.
void multiKeyInsertionSort(P *array, C cmp, size_t begin, size_t end, size_t depth=0)
Multi-key insertion-sort (part of) the given sequence.
int compare(bool lhs, bool rhs)
Compare two boolean values.
void init()
Initialize UTL++.