home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2068 / sqread.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-28  |  709 b   |  25 lines

  1. struct sqleaf {        /* Decoding tree */
  2.     int children[2];    /* left, right */
  3. };
  4.  
  5. typedef struct {
  6. #ifdef INTERNAL
  7.     FILE *file;
  8.     struct sqleaf sqleaf[256];
  9.     int issq;        /* non-zero if this file's squeezed */
  10.     int bpos;        /* last bit position read */
  11.     int curin;        /* last byte value read */
  12.     int repct;        /* Number of times to return value */
  13.     int value;        /* current byte value or EOF */
  14.     long rewpos;        /* rewind seek position */
  15. #endif
  16. } SQFILE;
  17.  
  18. SQFILE    *sqopen    (const char *path);
  19. void     sqrewind  (SQFILE *stream);
  20. long     sqseek    (SQFILE *stream, long offset);
  21. char    *sqgets    (char *s, int n, SQFILE *stream);
  22. long     sqtell    (SQFILE *stream);
  23. long     sqsize    (SQFILE *stream);
  24. int     sqclose   (SQFILE *stream);
  25.