Home Download Musics Developers
API Sources Tools File Format Technicals

gzip file support.
[file68 library documentation.]

Detailed Description

Provides functions for loading and saving gzip file.


file  gzip68.h
 gzip loader header.


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.

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.

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