Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
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#endif
14
15#include <zlib.h>
16#include "n_str.h"
17
23size_t GetMaxCompressedLen(size_t nLenSrc);
24size_t CompressData(unsigned char* abSrc, size_t nLenSrc, unsigned char* abDst, size_t nLenDst);
25size_t UncompressData(unsigned char* abSrc, size_t nLenSrc, unsigned char* abDst, size_t nLenDst);
26
27N_STR* zip_nstr(N_STR* src);
29
34#ifdef __cplusplus
35}
36#endif
37
38#endif // header guard
A box including a string and his lenght.
Definition n_str.h:39
size_t GetMaxCompressedLen(size_t nLenSrc)
Return the maximum compressed size.
Definition n_zlib.c:24
size_t UncompressData(unsigned char *abSrc, size_t nLenSrc, unsigned char *abDst, size_t nLenDst)
Uncompress a string to another.
Definition n_zlib.c:94
N_STR * unzip_nstr(N_STR *src)
return an uncompressed version of src
Definition n_zlib.c:199
N_STR * zip_nstr(N_STR *src)
return a compressed version of src
Definition n_zlib.c:148
N_STR and string function declaration.