2499
|
1
|
|
2 namespace zlib
|
|
3 {
|
|
4 #include "lib\zlib\zlib.h"
|
|
5 int MemUnzip(void *dest, unsigned int *destLen, const void *source, unsigned int sourceLen)
|
|
6 {
|
|
7 //return uncompress((zlib::Bytef *)dest, (zlib::uLongf *)destLen, (zlib::Bytef *)source, sourceLen);
|
|
8 return uncompress((Bytef *)dest, (uLongf *)destLen, (Bytef *)source, sourceLen);
|
|
9 return 0;
|
|
10 }
|
|
11
|
|
12 int MemZip(void *dest, unsigned int *destLen, void *source, unsigned int sourceLen)
|
|
13 {
|
|
14 //return compress((zlib::Bytef *)dest, (zlib::uLongf *)destLen, (zlib::Bytef *)source, sourceLen);
|
|
15 return compress((Bytef *)dest, (uLongf *)destLen, (Bytef *)source, sourceLen);
|
|
16 return 0;
|
|
17 }
|
|
18 }; |