API related to data compression (gzip format.)
More...
#include <stdio.h>
Go to the source code of this file.
|
void * | gvm_compress (const void *, unsigned long, unsigned long *) |
| Compresses data in src buffer.
|
|
void * | gvm_compress_gzipheader (const void *, unsigned long, unsigned long *) |
| Compresses data in src buffer, gzip format compatible.
|
|
void * | gvm_uncompress (const void *, unsigned long, unsigned long *) |
| Uncompresses data in src buffer.
|
|
FILE * | gvm_gzip_open_file_reader (const char *) |
| Opens a gzip file as a FILE* stream for reading and decompression.
|
|
FILE * | gvm_gzip_open_file_reader_fd (int) |
| Opens a gzip file as a FILE* stream for reading and decompression.
|
|
API related to data compression (gzip format.)
◆ gvm_compress()
void * gvm_compress |
( |
const void * | src, |
|
|
unsigned long | srclen, |
|
|
unsigned long * | dstlen ) |
Compresses data in src buffer.
- Parameters
-
[in] | src | Buffer of data to compress. |
[in] | srclen | Length of data to compress. |
[out] | dstlen | Length of compressed data. |
- Returns
- Pointer to compressed data if success, NULL otherwise.
◆ gvm_compress_gzipheader()
void * gvm_compress_gzipheader |
( |
const void * | src, |
|
|
unsigned long | srclen, |
|
|
unsigned long * | dstlen ) |
Compresses data in src buffer, gzip format compatible.
- Parameters
-
[in] | src | Buffer of data to compress. |
[in] | srclen | Length of data to compress. |
[out] | dstlen | Length of compressed data. |
- Returns
- Pointer to compressed data if success, NULL otherwise.
◆ gvm_gzip_open_file_reader()
FILE * gvm_gzip_open_file_reader |
( |
const char * | path | ) |
|
Opens a gzip file as a FILE* stream for reading and decompression.
- Parameters
-
[in] | path | Path to the gzip file to open. |
- Returns
- The FILE* on success, NULL otherwise.
◆ gvm_gzip_open_file_reader_fd()
FILE * gvm_gzip_open_file_reader_fd |
( |
int | fd | ) |
|
Opens a gzip file as a FILE* stream for reading and decompression.
- Parameters
-
[in] | fd | File descriptor of the gzip file to open. |
- Returns
- The FILE* on success, NULL otherwise.
◆ gvm_uncompress()
void * gvm_uncompress |
( |
const void * | src, |
|
|
unsigned long | srclen, |
|
|
unsigned long * | dstlen ) |
Uncompresses data in src buffer.
- Parameters
-
[in] | src | Buffer of data to uncompress. |
[in] | srclen | Length of data to uncompress. |
[out] | dstlen | Length of uncompressed data. |
- Returns
- Pointer to uncompressed data if success, NULL otherwise.