1 /**************************************************************************** 2 * Contents: 'Carryless rangecoder' by Dmitry Subbotin * 3 ****************************************************************************/ 4 5 6 class RangeCoder 7 { 8 public: 9 void InitDecoder(Unpack *UnpackRead); 10 inline int GetCurrentCount(); 11 inline uint GetCurrentShiftCount(uint SHIFT); 12 inline void Decode(); 13 inline void PutChar(unsigned int c); 14 inline unsigned int GetChar(); 15 16 uint low, code, range; 17 struct SUBRANGE 18 { 19 uint LowCount, HighCount, scale; 20 } SubRange; 21 22 Unpack *UnpackRead; 23 }; 24