sc68fordevelopers  2.2.1
Functions
gzip68.h File Reference

Load a gzipped file. More...

Go to the source code of this file.

Functions

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

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

Function Documentation

int gzip_is_magic ( const void *  buffer)

Test gzip file header magic header.

Parameters
bufferBuffer containing at least 3 bytes from gzip header.
Return values
1buffer seems to be gzipped..
0buffer 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
fnameName of file to load.
ulenPointer to uncompressed or total size of file. May be set to 0.
Returns
Pointer to the loaded file buffer.
Return values
0Error