Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Macros | Functions | Variables
minigzip.c File Reference
#include "zlib.h"
#include <stdio.h>

Go to the source code of this file.

Macros

#define SET_BINARY_MODE(file)
 
#define GZ_SUFFIX   ".gz"
 
#define SUFFIX_LEN   (sizeof(GZ_SUFFIX)-1)
 
#define BUFLEN   16384
 
#define MAX_NAME_LEN   1024
 
#define local
 

Functions

int unlink OF ((const char *))
 
void error OF ((const char *msg))
 
void gz_compress OF ((FILE *in, gzFile out))
 
void gz_uncompress OF ((gzFile in, FILE *out))
 
void file_compress OF ((char *file, char *mode))
 
void file_uncompress OF ((char *file))
 
int main OF ((int argc, char *argv[]))
 
void error (char *msg) const
 
void gz_compress (FILE *in, gzFile out)
 
void gz_uncompress (gzFile in, FILE *out)
 
void file_compress (char *file, char *mode)
 
void file_uncompress (char *file)
 
int main (int argc, argv)
 

Variables

char * prog
 

Macro Definition Documentation

◆ BUFLEN

#define BUFLEN   16384

Definition at line 135 of file minigzip.c.

Referenced by gz_compress(), and gz_uncompress().

◆ GZ_SUFFIX

#define GZ_SUFFIX   ".gz"

Definition at line 131 of file minigzip.c.

Referenced by file_compress(), and file_uncompress().

◆ local

#define local

Definition at line 142 of file minigzip.c.

Referenced by file_compress(), file_uncompress(), gz_compress(), and gz_uncompress().

◆ MAX_NAME_LEN

#define MAX_NAME_LEN   1024

Definition at line 136 of file minigzip.c.

Referenced by file_compress(), and file_uncompress().

◆ SET_BINARY_MODE

#define SET_BINARY_MODE (   file)

Definition at line 40 of file minigzip.c.

Referenced by main().

◆ SUFFIX_LEN

#define SUFFIX_LEN   (sizeof(GZ_SUFFIX)-1)

Definition at line 133 of file minigzip.c.

Referenced by file_uncompress().

Function Documentation

◆ error()

void error ( char *  msg) const

Definition at line 351 of file minigzip.c.

Referenced by gz_compress(), gz_uncompress(), and main().

◆ file_compress()

void file_compress ( char *  file,
char *  mode 
)

Definition at line 457 of file minigzip.c.

References gz_compress(), GZ_SUFFIX, gzopen(), local, MAX_NAME_LEN, NULL, out(), and outfile.

Referenced by main().

◆ file_uncompress()

void file_uncompress ( char *  file)

Definition at line 496 of file minigzip.c.

References GZ_SUFFIX, gz_uncompress(), gzopen(), infile, local, MAX_NAME_LEN, NULL, out(), outfile, and SUFFIX_LEN.

Referenced by main().

◆ gz_compress()

void gz_compress ( FILE *  in,
gzFile  out 
)

Definition at line 362 of file minigzip.c.

References BUFLEN, error(), gzclose(), gzerror(), gzwrite(), int, local, out(), Z_ERRNO, and Z_OK.

Referenced by file_compress(), and main().

◆ gz_uncompress()

void gz_uncompress ( gzFile  in,
FILE *  out 
)

Definition at line 430 of file minigzip.c.

References BUFLEN, error(), gzclose(), gzerror(), gzread(), local, and Z_OK.

Referenced by file_uncompress(), and main().

◆ main()

int main ( int  argc,
argv   
)

◆ OF() [1/7]

int unlink OF ( (const char *)  )

◆ OF() [2/7]

void error OF ( (const char *msg )

◆ OF() [3/7]

void gz_compress OF ( (FILE *in, gzFile out )

◆ OF() [4/7]

void gz_uncompress OF ( (gzFile in, FILE *out )

◆ OF() [5/7]

void file_compress OF ( (char *file, char *mode )

◆ OF() [6/7]

void file_uncompress OF ( (char *file)  )

◆ OF() [7/7]

int main OF ( (int argc, char *argv[])  )

Variable Documentation

◆ prog

char* prog

Definition at line 336 of file minigzip.c.