coder.hpp 632 B

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