mirror of https://github.com/Cisco-Talos/clamav
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
632 B
24 lines
632 B
![]()
7 years ago
|
/****************************************************************************
|
||
|
* 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;
|
||
|
};
|