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. |
int gzip_is_magic | ( | const void * | buffer | ) |
Test gzip file header magic header.
buffer | Buffer containing at least 3 bytes from gzip header. |
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.
fname | Name of file to load. | |
ulen | Pointer to uncompressed or total size of file. May be set to 0. |
0 | Error |