diff ZlibWrapper.cpp @ 2352:8a49cf25fb88

Moving zlib wrappers to separate headers
author Grumpy7
date Wed, 09 Apr 2014 21:51:06 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ZlibWrapper.cpp	Wed Apr 09 21:51:06 2014 +0200
@@ -0,0 +1,18 @@
+
+namespace zlib
+{
+#include "lib\zlib\zlib.h"
+  int MemUnzip(void *dest, unsigned int *destLen, const void *source, unsigned int sourceLen)
+  {
+    //return uncompress((zlib::Bytef *)dest, (zlib::uLongf *)destLen, (zlib::Bytef *)source, sourceLen);
+    return uncompress((Bytef *)dest, (uLongf *)destLen, (Bytef *)source, sourceLen);
+    return 0;
+  }
+
+  int MemZip(void *dest, unsigned int *destLen, void *source, unsigned int sourceLen)
+  {
+    //return compress((zlib::Bytef *)dest, (zlib::uLongf *)destLen, (zlib::Bytef *)source, sourceLen);
+    return compress((Bytef *)dest, (uLongf *)destLen, (Bytef *)source, sourceLen);
+    return 0;
+  }
+};
\ No newline at end of file