home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / drdobbs / ddjcompr / ashford / arith.h < prev    next >
C/C++ Source or Header  |  1991-04-13  |  530b  |  26 lines

  1. #define MIN_RANGE 0x4001
  2. #define MAX_RANGE 0xFFFF
  3.  
  4. struct coder_state
  5.  
  6. {
  7.     unsigned low;
  8.     unsigned range;
  9.     int uflow;
  10.     int bits;
  11.     int fpos;
  12. };
  13.  
  14.  
  15. void InitCoder (void);
  16. void CloseCoder (void);
  17. void EncodeArith (unsigned, unsigned, unsigned);
  18. void StartDecode (void);
  19. int DecodeArith (unsigned);
  20. void UpdateDecoder (unsigned, unsigned, unsigned);
  21. void SaveCoderState (struct coder_state *);
  22. void RestoreCoderState (struct coder_state *);
  23. int CodeLength (struct coder_state *);
  24. int ResetOutputPointer (int);
  25.  
  26.