comictagger/unrar/coder.hpp
lordwelch fbc1137e0f Revert "Changed: use unrar-cffi for cbr handling (#151)"
This reverts commit 83d2557af319efc410ab05f741a2ff8956a367e3.
2020-08-14 22:15:52 -07:00

24 lines
632 B
C++

/****************************************************************************
* Contents: 'Carryless rangecoder' by Dmitry Subbotin *
****************************************************************************/
class RangeCoder
{
public:
void InitDecoder(Unpack *UnpackRead);
inline int GetCurrentCount();
inline uint GetCurrentShiftCount(uint SHIFT);
inline void Decode();
inline void PutChar(unsigned int c);
inline unsigned int GetChar();
uint low, code, range;
struct SUBRANGE
{
uint LowCount, HighCount, scale;
} SubRange;
Unpack *UnpackRead;
};