Nilorea Library
C utilities for networking, threading, graphics
|
Functions | |
int | CompressData (unsigned char *abSrc, unsigned int nLenSrc, unsigned char *abDst, unsigned int nLenDst) |
Compress a string to another. More... | |
int | GetMaxCompressedLen (unsigned int nLenSrc) |
Return the maximum compressed size. More... | |
int | UncompressData (unsigned char *abSrc, unsigned int nLenSrc, unsigned char *abDst, unsigned int nLenDst) |
Uncompress a string to another. More... | |
N_STR * | unzip_nstr (N_STR *src) |
return an uncompressed version of src More... | |
N_STR * | zip_nstr (N_STR *src) |
return a compressed version of src More... | |
int CompressData | ( | unsigned char * | abSrc, |
unsigned int | nLenSrc, | ||
unsigned char * | abDst, | ||
unsigned int | nLenDst | ||
) |
Compress a string to another.
abSrc | source string |
nLenSrc | size of source string |
abDst | destination string |
nLenDst | destination length |
Definition at line 42 of file n_zlib.c.
References __n_assert, LOG_ERR, and n_log.
Referenced by zip_nstr().
int GetMaxCompressedLen | ( | unsigned int | nLenSrc | ) |
Return the maximum compressed size.
nLenSrc |
Definition at line 26 of file n_zlib.c.
Referenced by zip_nstr().
int UncompressData | ( | unsigned char * | abSrc, |
unsigned int | nLenSrc, | ||
unsigned char * | abDst, | ||
unsigned int | nLenDst | ||
) |
Uncompress a string to another.
abSrc | source string |
nLenSrc | size of source string |
abDst | destination string |
nLenDst | destination length |
Definition at line 99 of file n_zlib.c.
References __n_assert, LOG_ERR, and n_log.
Referenced by unzip_nstr().
return an uncompressed version of src
src | The source string |
Definition at line 203 of file n_zlib.c.
References __n_assert, free_nstr, LOG_DEBUG, LOG_ERR, n_log, new_nstr(), and UncompressData().
return a compressed version of src
src | The source string |
Definition at line 153 of file n_zlib.c.
References __n_assert, CompressData(), free_nstr, GetMaxCompressedLen(), LOG_DEBUG, LOG_ERR, n_log, and new_nstr().