home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / ZOO21E.EXE / LZH.H < prev    next >
C/C++ Source or Header  |  1991-07-11  |  971b  |  38 lines

  1. /*$Source: /usr/home/dhesi/zoo/RCS/lzh.h,v $*/
  2. /*$Id: lzh.h,v 1.3 91/07/09 01:39:23 dhesi Exp $*/
  3.  
  4. /*
  5. Adapted from "ar" archiver written by Haruhiko Okumura.
  6. */
  7.  
  8. /* Define some things if they aren't defined in header files */
  9. #ifndef CHAR_BIT
  10. # define CHAR_BIT 8
  11. #endif
  12.  
  13. #ifndef UCHAR_MAX
  14. # define UCHAR_MAX 255
  15. #endif
  16.  
  17. /* io.c */
  18.  
  19. extern FILE *arcfile, *lzh_infile, *lzh_infile;
  20. extern t_uint16 bitbuf;
  21. #define BITBUFSIZ (CHAR_BIT * sizeof bitbuf)
  22.  
  23. /* encode.c and decode.c */
  24.  
  25. #define MATCHBIT   8    /* bits for MAXMATCH - THRESHOLD */
  26. #define MAXMATCH 256    /* formerly F (not more than UCHAR_MAX + 1) */
  27. #define THRESHOLD  3    /* choose optimal value */
  28. #define PERC_FLAG ((unsigned) 0x8000)
  29.  
  30. /* huf.c */
  31.  
  32. #define NC (UCHAR_MAX + MAXMATCH + 2 - THRESHOLD)
  33.     /* alphabet = {0, 1, 2, ..., NC - 1} */
  34. #define CBIT 9  /* $\lfloor \log_2 NC \rfloor + 1$ */
  35. #define CODE_BIT  16  /* codeword length */
  36.  
  37. extern ushort left[], right[];
  38.