PolyVox  0.3.0-dev
Open source voxel management library
MinizCompressor.h
Go to the documentation of this file.
1 #ifndef __PolyVox_MinizCompressor_H__
2 #define __PolyVox_MinizCompressor_H__
3 
5 
6 namespace PolyVox
7 {
18  class MinizCompressor : public Compressor
19  {
20  public:
22  MinizCompressor(int iCompressionLevel = 6); // Miniz defines MZ_DEFAULT_LEVEL = 6 so we use the same here
25 
26  // API documentation is in base class and gets inherited by Doxygen.
27  uint32_t getMaxCompressedSize(uint32_t uUncompressedInputSize);
28  uint32_t compress(void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength);
29  uint32_t decompress(void* pSrcData, uint32_t uSrcLength, void* pDstData, uint32_t uDstLength);
30 
31  private:
32  unsigned int m_uCompressionFlags;
33 
34  // tdefl_compressor contains all the state needed by the low-level compressor so it's a pretty big struct (~300k).
35  // We're storing it by void* because miniz does not supply a header and we don't want to include the .c file from
36  // here as it will cause linker problems.
37  void* m_pDeflator;
38  };
39 }
40 
41 #endif //__PolyVox_MinizCompressor_H__