home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -seriously_amiga- / archivers / yacoder / codes.h < prev    next >
C/C++ Source or Header  |  1998-05-09  |  1KB  |  38 lines

  1. /*
  2.  * $Header: /usr/people/tcl/src/uutar/RCS/codes.h,v 1.1.1.2 1993/09/11 18:41:46 tcl Exp $
  3.  * Tom Lawrence
  4.  * tcl@sgi.com
  5.  */
  6.  
  7. /* number of printable characters in output character set */
  8. extern int numchars;
  9.  
  10. /* encoding/decoding table. inuse indicates whether or not the character
  11.  * whose ascii code is the offset into this array is part of the output 
  12.  * printable character set.
  13.  *
  14.  * When encoding, the next 8 bits (not necessarily byte aligned) in the
  15.  * input binary bitstream are used to index into this array. The code
  16.  * field then indicates the printable output character to append to the
  17.  * output, and the len field indicates how many of the input 8 bits
  18.  * should be comsumed by this operation, i.e. the input bitstream is
  19.  * advanced by len bits.
  20.  *
  21.  * When decoding, the input printable ascii character is used to index
  22.  * into this array. The variable length (8 bits or less) bitfield stored
  23.  * in code and whose length is len, is appended to the output binary
  24.  * bitstream.
  25.  */
  26. extern struct code {
  27.     char inuse;
  28.     char code;
  29.     char len;
  30. } codes[256];
  31.  
  32. void init_codes();
  33. void parse_charval_list();
  34. void print_charval_list();
  35.  
  36. #define ENCODE 0
  37. #define DECODE 1
  38.