Classes | Macros | Functions | Variables
zlib/examples/gun.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <utime.h>
#include "zlib.h"
Include dependency graph for zlib/examples/gun.c:

Go to the source code of this file.

Classes

struct  ind
 
struct  outd
 

Macros

#define FLUSHCODE()
 
#define local   static
 
#define NEXT()
 
#define PIECE   16384 /* limits i/o chunks for 16-bit int case */
 
#define SIZE   32768U /* input and output buffer sizes */
 

Functions

void copymeta (char *from, char *to)
 
int gunpipe (z_stream *strm, int infile, int outfile)
 
int gunzip (z_stream *strm, char *inname, char *outname, int test)
 
unsigned in (void *in_desc, z_const unsigned char **buf)
 
int lunpipe (unsigned have, z_const unsigned char *next, struct ind *indp, int outfile, z_stream *strm)
 
int main (int argc, char **argv)
 
int out (void *out_desc, unsigned char *buf, unsigned len)
 

Variables

unsigned char inbuf [SIZE]
 
unsigned char match [65280+2]
 
unsigned char outbuf [SIZE]
 
unsigned short prefix [65536]
 
unsigned char suffix [65536]
 

Macro Definition Documentation

◆ FLUSHCODE

#define FLUSHCODE ( )
Value:
do { \
left = 0; \
rem = 0; \
if (chunk > have) { \
chunk -= have; \
have = 0; \
if (NEXT() == -1) \
break; \
chunk--; \
if (chunk > have) { \
chunk = have = 0; \
break; \
} \
} \
have -= chunk; \
next += chunk; \
chunk = 0; \
} while (0)

Definition at line 171 of file zlib/examples/gun.c.

◆ local

#define local   static

Definition at line 73 of file zlib/examples/gun.c.

◆ NEXT

#define NEXT ( )
Value:
(have ? 0 : (have = in(indp, &next)), \
last = have ? (have--, (int)(*next++)) : -1)

Definition at line 155 of file zlib/examples/gun.c.

◆ PIECE

#define PIECE   16384 /* limits i/o chunks for 16-bit int case */

Definition at line 77 of file zlib/examples/gun.c.

◆ SIZE

#define SIZE   32768U /* input and output buffer sizes */

Definition at line 76 of file zlib/examples/gun.c.

Function Documentation

◆ copymeta()

void copymeta ( char *  from,
char *  to 
)

Definition at line 517 of file zlib/examples/gun.c.

◆ gunpipe()

int gunpipe ( z_stream strm,
int  infile,
int  outfile 
)

Definition at line 383 of file zlib/examples/gun.c.

◆ gunzip()

int gunzip ( z_stream strm,
char *  inname,
char *  outname,
int  test 
)

Definition at line 548 of file zlib/examples/gun.c.

◆ in()

unsigned in ( void *  in_desc,
z_const unsigned char **  buf 
)

Definition at line 89 of file zlib/examples/gun.c.

◆ lunpipe()

int lunpipe ( unsigned  have,
z_const unsigned char *  next,
struct ind indp,
int  outfile,
z_stream strm 
)

Definition at line 200 of file zlib/examples/gun.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 631 of file zlib/examples/gun.c.

◆ out()

int out ( void *  out_desc,
unsigned char *  buf,
unsigned  len 
)

Definition at line 131 of file zlib/examples/gun.c.

Variable Documentation

◆ inbuf

unsigned char inbuf[SIZE]

Definition at line 161 of file zlib/examples/gun.c.

◆ match

unsigned char match[65280+2]

Definition at line 165 of file zlib/examples/gun.c.

◆ outbuf

unsigned char outbuf[SIZE]

Definition at line 162 of file zlib/examples/gun.c.

◆ prefix

unsigned short prefix[65536]

Definition at line 163 of file zlib/examples/gun.c.

◆ suffix

unsigned char suffix[65536]

Definition at line 164 of file zlib/examples/gun.c.

NEXT
#define NEXT()
Definition: zlib/examples/gun.c:155
in
unsigned in(void *in_desc, z_const unsigned char **buf)
Definition: zlib/examples/gun.c:89
next
AllocList * next[kMaxLevel]
Definition: abseil-cpp/absl/base/internal/low_level_alloc.cc:100


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:19