/tmp/BUILD/sc68-2.2.1/file68/gzip68.h File Reference


Detailed Description

Load a gzipped file.

Author:
benjamin gerard
Date:
2003/09/03
Id
gzip68.h,v 2.2 2003/09/06 16:13:51 benjihan Exp

Go to the source code of this file.

Functions

int gzip_is_magic (const void *buffer)
 Test gzip file header magic header.
void * gzip_load (const char *fname, int *ulen)
 Load an optionnally gzipped file.


Function Documentation

int gzip_is_magic ( const void *  buffer  ) 

Test gzip file header magic header.

Parameters:
buffer Buffer containing at least 3 bytes from gzip header.
Return values:
1 buffer seems to be gzipped..
0 buffer is not gzipped.

void* gzip_load ( const char *  fname,
int *  ulen 
)

Load an optionnally gzipped file.

The gzip_load() function allocates memory and loads the totality of the given file. If the file is a gzipped file, it will be inflate.

Parameters:
fname Name of file to load.
ulen Pointer to uncompressed or total size of file. May be set to 0.
Returns:
Pointer to the loaded file buffer.
Return values:
0 Error


Generated on Thu Jul 20 15:04:56 2006 for sc68fordevelopers by  doxygen 1.4.7