flate

deflate implementation
git clone git://git.suckless.org/flate
Log | Files | Refs | README

flate.h (469B)


      1 typedef unsigned char uchar;
      2 typedef unsigned short ushort;
      3 typedef unsigned int uint;
      4 
      5 /* deflate and inflate return values */
      6 enum {
      7 	FlateOk  = 0,
      8 	FlateErr = -1,
      9 	FlateIn  = -2,
     10 	FlateOut = -3
     11 };
     12 
     13 typedef struct {
     14 	int nin;
     15 	int nout;
     16 	uchar *in;
     17 	uchar *out;
     18 	char *err;
     19 	void *state;
     20 } FlateStream;
     21 
     22 int deflate(FlateStream *s);
     23 int inflate(FlateStream *s);
     24 
     25 uint adler32(uchar *p, int n, uint adler);
     26 void crc32init(void);
     27 uint crc32(uchar *p, int n, uint crc);