annotate Engine/ZlibWrapper.cpp @ 2542:bacf9809126a

.
author a.parshin
date Sun, 10 May 2015 02:04:52 +0200
parents 68cdef6879a0
children
rev   line source
2499
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
1
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
2 namespace zlib
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
3 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
4 #include "lib\zlib\zlib.h"
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
5 int MemUnzip(void *dest, unsigned int *destLen, const void *source, unsigned int sourceLen)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
6 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
7 //return uncompress((zlib::Bytef *)dest, (zlib::uLongf *)destLen, (zlib::Bytef *)source, sourceLen);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
8 return uncompress((Bytef *)dest, (uLongf *)destLen, (Bytef *)source, sourceLen);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
9 return 0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
10 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
11
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
12 int MemZip(void *dest, unsigned int *destLen, void *source, unsigned int sourceLen)
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
13 {
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
14 //return compress((zlib::Bytef *)dest, (zlib::uLongf *)destLen, (zlib::Bytef *)source, sourceLen);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
15 return compress((Bytef *)dest, (uLongf *)destLen, (Bytef *)source, sourceLen);
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
16 return 0;
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
17 }
68cdef6879a0 engine folder
Ritor1
parents:
diff changeset
18 };