From 7aff1e4cb053394db57c2814d5fe1e6493e0cc75 Mon Sep 17 00:00:00 2001 From: watcherhd Date: Sat, 26 Nov 2011 14:19:43 +0000 Subject: Project folders rename part 2 git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@214 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- cryptopp/cpp_gzip.cpp | 57 --------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 cryptopp/cpp_gzip.cpp (limited to 'cryptopp/cpp_gzip.cpp') diff --git a/cryptopp/cpp_gzip.cpp b/cryptopp/cpp_gzip.cpp deleted file mode 100644 index c819779..0000000 --- a/cryptopp/cpp_gzip.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "commonheaders.h" - -// gzip data -BYTE *cpp_gzip(BYTE *pData, int nLen, int& nCompressedLen) { - - string zipped; - Gzip gzip(new StringSink(zipped),5); // 1 is fast, 9 is slow - gzip.Put(pData, nLen); - gzip.MessageEnd(); - - nCompressedLen = (int) zipped.length(); - PBYTE pCompressed = (PBYTE) malloc(nCompressedLen+1); - memcpy(pCompressed,zipped.data(),nCompressedLen); - - return pCompressed; -} - -// gunzip data -BYTE *cpp_gunzip(BYTE *pCompressedData, int nCompressedLen, int& nLen) { - - string unzipped; - Gunzip gunzip(new StringSink(unzipped)); - gunzip.Put((PBYTE)pCompressedData,nCompressedLen); - gunzip.MessageEnd(); - - nLen = (int) unzipped.length(); - PBYTE pData = (PBYTE) malloc(nLen+1); - memcpy(pData,unzipped.data(),nLen); - - return pData; -} - -// zlibc data -string cpp_zlibc(string& pData) { - - string zipped; - - ZlibCompressor zlib(new StringSink(zipped),5); // 1 is fast, 9 is slow - zlib.Put((PBYTE)pData.data(), pData.length()); - zlib.MessageEnd(); - - return zipped; -} - -// zlibd data -string cpp_zlibd(string& pData) { - - string unzipped; - - ZlibDecompressor zlib(new StringSink(unzipped)); - zlib.Put((PBYTE)pData.data(),pData.length()); - zlib.MessageEnd(); - - return unzipped; -} - -// EOF -- cgit v1.2.3