examples/PIPS/openclibz/inc/openclibzheader.h File Reference

Go to the source code of this file.

Defines

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

Functions

void StringCompress ()
void Error OF ((const char *msg))
void GzCompress OF ((FILE *in, gzFile out))
void GzUnCompress OF ((gzFile in, FILE *out))
void FileCompress OF ((char *file, char *mode))
void FileUnCompress OF ((char *file))

Detailed Description

Definition in file openclibzheader.h.


Function Documentation

void StringCompress (  ) 

Compresses the string This function compresses the string entered by the user and shows the compressed string and then decompressess it Actually This function will show the content on the screen and demonstarte how strings can be compressed

Definition at line 174 of file compress.c.

void Error OF ( (const char *msg)   ) 

In case of any error display the error message

Parameters:
msg will be displayed to the user
Returns:
No return code ,application will terminate after displaying the error message.
void GzCompress OF ( (FILE *in, gzFile out)   ) 

Compresses the input file First tries to compress using GzCompressMmap ,But if it fails it tries normal technique

Parameters:
in is the name of input file .
out is the name of output file.
Returns:
a Symbian OS error code.
void GzUnCompress OF ( (gzFile in, FILE *out)   ) 

GzCompressMmap function compresses the file using mmap technique Compression can be done in a single step using mmap but it requires enough large buffers. I have implemented my code such that, EvenIn case of mmap failure (because of shortage of buffer space) It compresses using normal technique.

Parameters:
in the name of input file.
out is the name of output file. UnCompresses the file using libz api's
in is the name of input file .
out is the name of output file.
void FileCompress OF ( (char *file, char *mode)   ) 

Compresses the File It creates the output filename . It checkes for the existence of input file. And then it calls GzCompress .

Parameters:
file is the name of the file to be compressed
mode is for the technique used for opening the file.
void FileUnCompress OF ( (char *file)   ) 

It generates the output filename . It checks for the existence of the file and then calls GzUnCompress.

Parameters:
file is the name of the compressed (.gz) file .

Generated by  doxygen 1.6.2