Nilorea Library
C utilities for networking, threading, graphics
n_zlib.h
Go to the documentation of this file.
1
8#ifndef __N__Z_LIB_HEADER
9#define __N__Z_LIB_HEADER
10
11#ifdef __cplusplus
12extern "C"
13{
14#endif
15
16#include <zlib.h>
17#include "n_str.h"
18
24int GetMaxCompressedLen( unsigned int nLenSrc );
25int CompressData( unsigned char *abSrc, unsigned int nLenSrc, unsigned char *abDst, unsigned int nLenDst );
26int UncompressData( unsigned char *abSrc, unsigned int nLenSrc, unsigned char *abDst, unsigned int nLenDst );
27
28N_STR *zip_nstr( N_STR *src );
29N_STR *unzip_nstr( N_STR *src );
30
35#ifdef __cplusplus
36}
37#endif
38
39#endif // header guard
A box including a string and his lenght.
Definition: n_str.h:173
int GetMaxCompressedLen(unsigned int nLenSrc)
Return the maximum compressed size.
Definition: n_zlib.c:26
int CompressData(unsigned char *abSrc, unsigned int nLenSrc, unsigned char *abDst, unsigned int nLenDst)
Compress a string to another.
Definition: n_zlib.c:42
int UncompressData(unsigned char *abSrc, unsigned int nLenSrc, unsigned char *abDst, unsigned int nLenDst)
Uncompress a string to another.
Definition: n_zlib.c:99
N_STR * unzip_nstr(N_STR *src)
return an uncompressed version of src
Definition: n_zlib.c:203
N_STR * zip_nstr(N_STR *src)
return a compressed version of src
Definition: n_zlib.c:153
N_STR and string function declaration.