KSquare Utilities
Compressor.h
Go to the documentation of this file.
1 /* Compressor.h -- Compresses and decompresses data using zLib Library
2  * Copyright (C) 1994-2011 Kurt Kramer
3  * For conditions of distribution and use, see copyright notice in KKB.h
4  */
5 #ifndef _COMPRESSOR_
6 #define _COMPRESSOR_
7 
8 #include "KKBaseTypes.h"
9 
10 /**
11  * @class KKB::Compressor
12  * @brief Simple class that will compress and decompress specified buffers using the routines provided in zlib.
13  * @author Kurt Kramer
14  */
15 namespace KKB
16 {
17  class Compressor
18  {
19  public:
20  static
21  void* CreateCompressedBuffer (void* source,
22  kkuint32 sourceLen,
23  kkuint32& compressedBuffLen
24  );
25 
26 
27  static
28  void* Decompress (const void* compressedBuff,
29  kkuint32 compressedBuffLen,
30  kkuint32& unCompressedLen
31  );
32 
33  static
34  void Decompress (const void* compressedBuff,
35  kkuint32 compressedBuffLen,
36  uchar*& unCompressedBuff,
37  kkuint32& unCompressedBuffSize,
38  kkuint32& unCompressedBuffLen
39  );
40  };
41 }
42 
43 
44 #endif
Simple class that will compress and decompress specified buffers using the routines provided in zlib...
Definition: Compressor.h:17
unsigned __int32 kkuint32
Definition: KKBaseTypes.h:89
static void * Decompress(const void *compressedBuff, kkuint32 compressedBuffLen, kkuint32 &unCompressedLen)
Definition: Compressor.cpp:177
static void * CreateCompressedBuffer(void *source, kkuint32 sourceLen, kkuint32 &compressedBuffLen)
Definition: Compressor.cpp:22
KKTHread * KKTHreadPtr
static void Decompress(const void *compressedBuff, kkuint32 compressedBuffLen, uchar *&unCompressedBuff, kkuint32 &unCompressedBuffSize, kkuint32 &unCompressedBuffLen)
Definition: Compressor.cpp:294
unsigned char uchar
Unsigned character.
Definition: KKBaseTypes.h:77