home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / PIBLZW.ZIP / PIBLZW.DEF < prev    next >
Encoding:
Text File  |  1988-04-30  |  2.5 KB  |  46 lines

  1. (*--------------------------------------------------------------------------*)
  2. (*                                                                          *)
  3. (*                  Global declarations for PIBLZW                          *)
  4. (*                                                                          *)
  5. (*--------------------------------------------------------------------------*)
  6.  
  7. CONST
  8.    MaxBuff  = 8192                 (* Buffer size for input and output files *);
  9.    MaxTab   = 4095                 (* Table size - 1 ==> 2**10-1 ==> 12 bits *);
  10.    No_Prev  = $7FFF                (* Special code for no previous character *);
  11.    EOF_Char = -2                   (* Marks end of file                      *);
  12.    End_List = -1                   (* Marks end of a list                    *);
  13.    Empty    = -3                   (* Indicates empty                        *);
  14.  
  15. TYPE
  16.    AnyStr             = STRING[255]  (* General string type                  *);
  17.  
  18.                                    (* One node in parsing table.             *)
  19.    String_Table_Entry = RECORD
  20.                            Used     : BOOLEAN  (* Is this node used yet?      *);
  21.                            PrevChar : INTEGER  (* Code for preceding string   *);
  22.                            FollChar : INTEGER  (* Code for current character  *);
  23.                            Next     : INTEGER  (* Next dupl in collision list *);
  24.                         END;
  25.  
  26. VAR
  27.    Input_File     : FILE                     (* Input file   *);
  28.    Output_File    : FILE                     (* Output file  *);
  29.  
  30.    InBufSize      : INTEGER                  (* Count of chars in input buffer *);
  31.  
  32.    Input_Buffer   : ARRAY[1..MaxBuff] OF BYTE (* Input buffer area         *);
  33.    Output_Buffer  : ARRAY[1..MaxBuff] OF BYTE (* Output buffer area        *);
  34.  
  35.    Input_Pos      : INTEGER                  (* Cur. pos. in input buffer   *);
  36.    Output_Pos     : INTEGER                  (* Cur. pos. in output buffer  *);
  37.  
  38.                                              (* String table *)
  39.  
  40.    String_Table   : ARRAY[0..MaxTab] OF String_Table_Entry;
  41.  
  42.    Table_Used     : INTEGER                  (* # string table entries used *);
  43.    Output_Code    : INTEGER                  (* Output compressed code      *);
  44.    Input_Code     : INTEGER                  (* Input compressed code       *);
  45.    If_Compressing : BOOLEAN                  (* TRUE if compressing file    *);
  46.    Ierr           : INTEGER                  (* Input/output error          *);