mad_zlib.h File Reference

ZLIB compression. More...

#include "flute_defines.h"
#include "../alclib/defines.h"

Include dependency graph for mad_zlib.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int file_gzip_compress (char *file, char *mode)
int file_gzip_uncompress (char *file)
char * buffer_zlib_compress (char *buf, unsigned long long buflen, unsigned long long *comprlen)
char * buffer_zlib_uncompress (char *buf, unsigned long long buflen, unsigned long long *uncomprlen)
char * buffer_gzip_uncompress (char *buf, unsigned long long buflen, unsigned long long uncomprlen)


Detailed Description

ZLIB compression.

Author
peltotal
Date
2007/02/28 08:58:01
Revision
1.10

MAD-FLUTELIB: Implementation of FLUTE protocol. Copyright (c) 2003-2007 TUT - Tampere University of Technology main authors/contacts: jani.peltotalo@tut.fi and sami.peltotalo@tut.fi

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

In addition, as a special exception, TUT - Tampere University of Technology gives permission to link the code of this program with the OpenSSL library (or with modified versions of OpenSSL that use the same license as OpenSSL), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than OpenSSL. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

Definition in file mad_zlib.h.


Function Documentation

char* buffer_gzip_uncompress ( char *  buf,
unsigned long long  buflen,
unsigned long long  uncomprlen 
)

This function uncompresses the given buffer.

Parameters:
buf pointer to the buffer to be uncompressed
buflen the length of the buffer to be uncompressed
uncomprlen stores the length of the uncompressed buffer
Returns:
pointer to the buffer containing uncompressed data, NULL in error cases
TODO: not work yet, returns invalid compressed data now.

Definition at line 299 of file mad_zlib.c.

char* buffer_zlib_compress ( char *  buf,
unsigned long long  buflen,
unsigned long long *  comprlen 
)

This function compresses the given buffer.

Parameters:
buf pointer to the buffer to be compressed
buflen the length of the buffer to be compressed
comprlen stores the length of the compressed buffer
Returns:
pointer to the buffer containing compressed data, NULL in error cases

Definition at line 220 of file mad_zlib.c.

Referenced by fdtbasedsend().

Here is the caller graph for this function:

char* buffer_zlib_uncompress ( char *  buf,
unsigned long long  buflen,
unsigned long long *  uncomprlen 
)

This function uncompresses the given buffer.

Parameters:
buf pointer to the buffer to be uncompressed
buflen the length of the buffer to be uncompressed
uncomprlen stores the length of the uncompressed buffer
Returns:
pointer to the buffer containing uncompressed data, NULL in error cases

Definition at line 248 of file mad_zlib.c.

Referenced by fdt_thread(), and recvfile().

Here is the caller graph for this function:

int file_gzip_compress ( char *  file,
char *  mode 
)

This function compresses the given file and creates a corresponding ~gz file.

Parameters:
file file name
mode compression mode
Returns:
0 in success, -1 otherwise

Definition at line 147 of file mad_zlib.c.

References gz_compress(), GZ_SUFFIX, and MAX_PATH_LENGTH.

Referenced by encode_directory(), and encode_file().

Here is the call graph for this function:

Here is the caller graph for this function:

int file_gzip_uncompress ( char *  file  ) 

This function uncompresses the given file and removes the original.

Parameters:
file file name
Returns:
0 in success, -1 otherwise

Definition at line 176 of file mad_zlib.c.

References GZ_SUFFIX_LEN, gz_uncompress(), and MAX_PATH_LENGTH.

Referenced by fdtbasedrecv(), and recvfile().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Fri Mar 9 20:03:01 2007 for MAD-FCL by  doxygen 1.5.0